]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
Poppler removed memCheck and gMemReport functions 66/head
authorOlivier Schonken <olivier.schonken@gmail.com>
Fri, 5 Oct 2018 10:05:31 +0000 (12:05 +0200)
committerOlivier Schonken <olivier.schonken@gmail.com>
Fri, 5 Oct 2018 10:19:24 +0000 (12:19 +0200)
Only use gMemReport and memCheck functions if poppler version less
than 0.69.0

The poppler project removed the memCheck and gMemReport functions in
commits c362ab1b97f20c5b73b3bad8d52015f679178748 - Remove DEBUG_MEM
from Object since this uses RAII now and hence cannot leak.
(The existing tracking also is not thread-safe and hence unreliable.)

and

f89446f6917a869b0f1a80fcc8ce81a7213dade4 - Remove generic heap debugging
from gmem since external tools and compiler instrumentation achieve the
same effect.

This commit solves https://github.com/OpenPrinting/cups-filters/issues/62

Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
filter/pdftoijs.cxx
filter/pdftoopvp/pdftoopvp.cxx
filter/pdftoraster.cxx

index 22bc33f43a368e7f27011067e3d7304a78220bd8..dd6b6fa0cd3b60b22ad18ffcf73e3db298cbefa9 100644 (file)
@@ -503,9 +503,11 @@ err1:
   ppdClose(ppd);
   free(outputfile);
 
+#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 69
   // Check for memory leaks
   Object::memCheck(stderr);
   gMemReport(stderr);
+#endif
 
   return exitCode;
 }
index 024941ab03aacc1565b14da1cd0d314ffc646f9f..bf25983bc6867f91fd50cc1b34509081c7e0955b 100644 (file)
@@ -763,9 +763,11 @@ err2:
  err0:
   delete globalParams;
 
+#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 69
   // check for memory leaks
   Object::memCheck(stderr);
   gMemReport(stderr);
+#endif
 
 }
 /* muntrace(); */
index 0c63ab8d52028b633f2691d78a5b11c713779746..4ebf02b0cd3def4ccff485e0e18c29cf2f54ef3f 100644 (file)
@@ -2162,9 +2162,11 @@ err1:
     cmsDeleteTransform(colorTransform);
   }
 
+#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 69
   // Check for memory leaks
   Object::memCheck(stderr);
   gMemReport(stderr);
+#endif
 
   return exitCode;
 }