Bug 9428

Summary: Memory leak in poppler-page.cc
Product: poppler Reporter: Jerry Epplin <jepplin>
Component: qt frontendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Jerry Epplin 2006-12-22 12:26:59 UTC
This patch appears to fix it for my purposes.

--- poppler-page.cc.orig        2006-12-22 14:00:04.000000000 -0600
+++ poppler-page.cc     2006-12-22 14:04:58.000000000 -0600
@@ -156,7 +156,9 @@

   for (int i = 0; i < word_list->getLength(); i++) {
     TextWord *word = word_list->get(i);
-    QString string = QString::fromUtf8(word->getText()->getCString());
+    GooString *word_str = word->getText();
+    QString string = QString::fromUtf8(word_str->getCString());
+    delete word_str;
     double xMin, yMin, xMax, yMax;
     word->getBBox(&xMin, &yMin, &xMax, &yMax);
Comment 1 Albert Astals Cid 2006-12-22 15:23:34 UTC
Thanks for the patch, i fixed this leak some time ago in the qt4 frontend but 
forgot the qt3 one.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.