Bug 45805

Summary: two memory leaks in pdftohtml
Product: poppler Reporter: Igor Slepchin <igor.redhat>
Component: pdftohtmlAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: minor code cleanup
fix the two leaks mentioned above.

Description Igor Slepchin 2012-02-08 14:24:37 UTC
1. getInfoString() in pdftohtml.cc leaks a GooString() on every call (this is called a fixed number of times per run)
2. HtmlOutputDev::mapEncodingToHtml returns a new char* on every call that is never freed (this is called for every generated .html file).
Comment 1 Igor Slepchin 2012-02-08 14:53:17 UTC
Created attachment 56780 [details] [review]
minor code cleanup

First, get rid of static data members and some duplicated code.
Comment 2 Igor Slepchin 2012-02-08 14:54:12 UTC
Created attachment 56781 [details] [review]
fix the two leaks mentioned above.
Comment 3 Albert Astals Cid 2012-02-08 15:00:57 UTC
Fixed in next release. Thanks for the report
Comment 4 Albert Astals Cid 2012-02-08 15:01:28 UTC
Doh, i fixed those already :D
Comment 5 Albert Astals Cid 2012-02-08 15:15:39 UTC
Pushed your cleanup code to master too.
Comment 6 Igor Slepchin 2012-02-08 15:40:06 UTC
Sorry, I should've mentioned I was about to submit a patch :o

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.