[Poppler-bugs] [Bug 17674] New: Mismatched free() / delete in HtmlOutputDev.cc

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Sep 20 04:57:12 PDT 2008


http://bugs.freedesktop.org/show_bug.cgi?id=17674

           Summary: Mismatched free() / delete in HtmlOutputDev.cc
           Product: poppler
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
        AssignedTo: poppler-bugs at lists.freedesktop.org
        ReportedBy: tomasare at gmail.com


The text property in the HtmlString class is allocated with grealloc() and
should therefore be freed with gfree() instead of delete in the HtmlString
destructor.

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 54f62e7..df4b6bf 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -142,7 +142,7 @@ HtmlString::HtmlString(GfxState *state, double fontSize,
HtmlFontAccu* fonts) {


 HtmlString::~HtmlString() {
-  delete text;
+  gfree(text);
   delete htext;
   gfree(xRight);
 }


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list