[poppler] Branch 'poppler-0.6' - qt4/src

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Sep 17 23:10:21 PDT 2007


 qt4/src/poppler-document.cc |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
diff-tree c49380ca2561834977accd12f5616af8573d32f4 (from 21a048d288c5f1119dd719aad5238de57399e12b)
Author: Albert Astals Cid <tsdgeos at bluebox.localdomain>
Date:   Tue Sep 18 08:10:47 2007 +0200

    Backport: Avoid double free caused by 302 merge
    
    The ownership of the the string returned by getKey() changed with the 302 merge
    but this code was not updated. Found by Matthew Woehlke.

diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
index 7985adc..e34b1f2 100644
--- a/qt4/src/poppler-document.cc
+++ b/qt4/src/poppler-document.cc
@@ -274,9 +274,7 @@ namespace Poppler {
 	Dict *infoDict = info.getDict();
 	// somehow iterate over keys in infoDict
 	for( int i=0; i < infoDict->getLength(); ++i ) {
-	    const char *aux = infoDict->getKey(i);
-	    keys.append( QString::fromAscii(aux) );
-	    delete[] aux;
+	    keys.append( QString::fromAscii(infoDict->getKey(i)) );
 	}
 
 	info.free();


More information about the poppler mailing list