[poppler] poppler/qt: poppler-document.cc,1.12,1.12.2.1

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Dec 28 08:56:28 PST 2006


Update of /cvs/poppler/poppler/qt
In directory kemper:/tmp/cvs-serv8312/qt

Modified Files:
      Tag: POPPLER_0_5_X
	poppler-document.cc 
Log Message:
* qt4/src/poppler-embeddedfile.cc:
* qt4/src/poppler-document.cc:
* qt/poppler-document.cc: Fix memory leaks.


Index: poppler-document.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt/poppler-document.cc,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -u -d -r1.12 -r1.12.2.1
--- poppler-document.cc	26 Jul 2006 18:16:01 -0000	1.12
+++ poppler-document.cc	28 Dec 2006 16:56:26 -0000	1.12.2.1
@@ -216,6 +216,7 @@
   if ( infoDict->lookup( (char*)type.latin1(), &obj )->isString() )
   {
     s = UGooString(*obj.getString()).getCString();
+    const char *aux = s;
     if ( s[0] == 'D' && s[1] == ':' )
       s += 2;
     /* FIXME process time zone on systems that support it */  
@@ -232,6 +233,7 @@
 	else {
 	  obj.free();
 	  info.free();
+	  delete aux;
 	  return QDateTime();
 	}
       }
@@ -241,9 +243,11 @@
       if ( d.isValid() && t.isValid() ) {
 	obj.free();
 	info.free();
+	delete aux;
 	return QDateTime( d, t );
       }
     }
+    delete aux;
   }
   obj.free();
   info.free();



More information about the poppler mailing list