Bug 45805 - two memory leaks in pdftohtml
Summary: two memory leaks in pdftohtml
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: pdftohtml (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-08 14:24 UTC by Igor Slepchin
Modified: 2012-02-08 15:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
minor code cleanup (10.06 KB, patch)
2012-02-08 14:53 UTC, Igor Slepchin
Details | Splinter Review
fix the two leaks mentioned above. (5.76 KB, patch)
2012-02-08 14:54 UTC, Igor Slepchin
Details | Splinter Review

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.