Bug 25466

Summary: valgridn report memory leaks due to fontconfig
Product: poppler Reporter: Axel Struebing <axel.struebing>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: minor    
Priority: low    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Axel Struebing 2009-12-05 12:49:03 UTC
initialization of fontconfig library in GlobalParams.cc by FcInit() is not accompanied by FcFini() in destructor.

This results in valgrind reporting memory leaks.

May be this is just an annoyance to me. Calling FcFini();
just before deleting GlobalParams reduces the reported errors to one.
Comment 1 Albert Astals Cid 2009-12-05 14:17:28 UTC
Unfortunately Fontconfig doesn't "count" the number of FcInits done and on the first FcFini it frees memory. That means doing FcFini in poppler is dangerous because it would destroy the fontconfig memory of your app if your app did FcInit before poppler.
Comment 2 Axel Struebing 2009-12-07 11:55:40 UTC
understood, thanks for the explanation

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.