[poppler] poppler/qt4/src: poppler-document.cc, 1.22.2.1, 1.22.2.2 poppler-embeddedfile.cc, 1.2, 1.2.2.1

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


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

Modified Files:
      Tag: POPPLER_0_5_X
	poppler-document.cc poppler-embeddedfile.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/qt4/src/poppler-document.cc,v
retrieving revision 1.22.2.1
retrieving revision 1.22.2.2
diff -u -d -r1.22.2.1 -r1.22.2.2
--- poppler-document.cc	18 Oct 2006 18:31:43 -0000	1.22.2.1
+++ poppler-document.cc	28 Dec 2006 16:56:26 -0000	1.22.2.2
@@ -248,7 +248,9 @@
 	Dict *infoDict = info.getDict();
 	// somehow iterate over keys in infoDict
 	for( int i=0; i < infoDict->getLength(); ++i ) {
-	    keys.append( QString::fromAscii(infoDict->getKey(i)->getCString()) );
+	    char *aux = infoDict->getKey(i)->getCString();
+	    keys.append( QString::fromAscii(aux) );
+	    delete[] aux;
 	}
 
 	info.free();

Index: poppler-embeddedfile.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-embeddedfile.cc,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- poppler-embeddedfile.cc	5 Aug 2006 17:10:07 -0000	1.2
+++ poppler-embeddedfile.cc	28 Dec 2006 16:56:26 -0000	1.2.2.1
@@ -46,7 +46,9 @@
 {
 	m_embeddedFile = new EmbeddedFileData();
 	m_embeddedFile->m_label = QString(embfile->name()->getCString());
-	m_embeddedFile->m_description = QString(UGooString(*embfile->description()).getCString());
+	const char *aux = UGooString(*embfile->description()).getCString();
+	m_embeddedFile->m_description = QString(aux);
+	delete[] aux;
 	m_embeddedFile->m_modDate = convertDate(embfile->modDate()->getCString());
 	m_embeddedFile->m_createDate = convertDate(embfile->createDate()->getCString());
 	embfile->streamObject().copy(&m_embeddedFile->m_streamObject);



More information about the poppler mailing list