Bug 694827 - Memory leaks in pdf_load_embedded_font and pdf_load_substitute_font (possibly).
Summary: Memory leaks in pdf_load_embedded_font and pdf_load_substitute_font (possibly).
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: fitz (show other bugs)
Version: master
Hardware: All All
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-01 12:15 UTC by quetzal
Modified: 2013-12-17 07:30 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
stupid patch :( (1.04 KB, application/octet-stream)
2013-12-01 12:15 UTC, quetzal
Details

Note You need to log in before you can comment on or make changes to this bug.
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.