Update of /cvs/poppler/poppler/splash
In directory kemper:/tmp/cvs-serv10350/splash

Modified Files:
        SplashFontEngine.cc 
Log Message:
        * splash/SplashFontEngine.cc:
        * poppler/SplashOutputDev.cc: Fix memory leak when using embedded
        fonts in the pdf file. Patch by Krzysztof Kowalczyk


Index: SplashFontEngine.cc
===================================================================
RCS file: /cvs/poppler/poppler/splash/SplashFontEngine.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- SplashFontEngine.cc 2 Feb 2006 22:50:01 -0000       1.3
+++ SplashFontEngine.cc 30 Jul 2006 09:38:28 -0000      1.4
@@ -126,7 +126,8 @@
   // semantics, this will remove the last link; otherwise it will
   // return an error, leaving the file to be deleted later (if
   // loadXYZFont failed, the file will always be deleted)
-  src->unref();
+  if (src->isFile)
+    src->unref();
 #endif
 
   return fontFile;
@@ -154,7 +155,8 @@
   // semantics, this will remove the last link; otherwise it will
   // return an error, leaving the file to be deleted later (if
   // loadXYZFont failed, the file will always be deleted)
-  src->unref();
+  if (src->isFile)
+    src->unref();
 #endif
 
   return fontFile;
@@ -176,7 +178,8 @@
   // semantics, this will remove the last link; otherwise it will
   // return an error, leaving the file to be deleted later (if
   // loadXYZFont failed, the file will always be deleted)
-  src->unref();
+  if (src->isFile)
+    src->unref();
 #endif
 
   return fontFile;
@@ -206,7 +209,8 @@
   // semantics, this will remove the last link; otherwise it will
   // return an error, leaving the file to be deleted later (if
   // loadXYZFont failed, the file will always be deleted)
-  src->unref();
+  if (src->isFile)
+    src->unref();
 #endif
 
   return fontFile;

_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to