Bug 84768

Summary: Fix memory leaks when running pdfseparate
Product: poppler Reporter: Albert Astals Cid <aacid>
Component: generalAssignee: 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: The said patch

Description Albert Astals Cid 2014-10-07 22:01:00 UTC
Created attachment 107528 [details] [review]
The said patch

valgrind --leak-check=full ./utils/pdfseparate ~/okularfiles/pdf/ansi_c.pdf -f 1 -l 1 moo%d

without the patch i get 

==19598== LEAK SUMMARY:
==19598==    definitely lost: 368 bytes in 13 blocks
==19598==    indirectly lost: 668,796 bytes in 145 blocks
==19598==      possibly lost: 0 bytes in 0 blocks


with the patch i get

==21725== LEAK SUMMARY:
==21725==    definitely lost: 0 bytes in 0 blocks
==21725==    indirectly lost: 0 bytes in 0 blocks
==21725==      possibly lost: 0 bytes in 0 blocks

So i think it looks good, but would like Thomas' review.

It also removes some unused code.
Comment 1 Thomas Freitag 2014-10-08 07:42:33 UTC
It looks good for me
Comment 2 Albert Astals Cid 2014-10-08 20:36:57 UTC
Pushed, thanks!

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.