[poppler] poppler/qt4/src: poppler-document.cc, 1.25,
1.26 poppler-embeddedfile.cc, 1.2, 1.3
Albert Astals Cid
aacid at kemper.freedesktop.org
Thu Dec 28 09:22:38 PST 2006
Update of /cvs/poppler/poppler/qt4/src
In directory kemper:/tmp/cvs-serv8454/qt4/src
Modified Files:
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.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- poppler-document.cc 18 Nov 2006 17:08:05 -0000 1.25
+++ poppler-document.cc 28 Dec 2006 17:22:36 -0000 1.26
@@ -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()) );
+ const 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.3
diff -u -d -r1.2 -r1.3
--- poppler-embeddedfile.cc 5 Aug 2006 17:10:07 -0000 1.2
+++ poppler-embeddedfile.cc 28 Dec 2006 17:22:36 -0000 1.3
@@ -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