Bug 694827

Summary: Memory leaks in pdf_load_embedded_font and pdf_load_substitute_font (possibly).
Product: MuPDF Reporter: quetzal <4quetz>
Component: fitzAssignee: MuPDF bugs <mupdf-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: robin.watts, zeniko
Priority: P4    
Version: master   
Hardware: All   
OS: All   
Customer: Word Size: ---
Attachments: stupid patch :(

Description quetzal 2013-12-01 12:15:40 UTC
Created attachment 10431 [details]
stupid patch :(

I'm not 100% sure about the latter. But former (pdf_load_embedded_font) surely leaks.

In short: fz_new_font_from_buffer increments refcount and original buffer must be released. Stupid patch is attached.
Comment 1 zeniko 2013-12-01 12:19:27 UTC
Thanks for the report and the attached patch. This issue should have been fixed just recently with http://git.ghostscript.com/?p=mupdf.git;a=commitdiff;h=827a710ffda3a28a302f22233e45e18697bbfa26
Comment 2 Robin Watts 2013-12-17 07:30:20 UTC
Believed fixed. Thanks to both quetzal for reporting it, and to zeniko for responding.