Happens at least with 68.pdf.asan.7.1030 ==32010== 8 bytes in 1 blocks are definitely lost in loss record 45 of 388 ==32010== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==32010== by 0x51B31D6: gmalloc(unsigned long, bool) (gmem.cc:120) ==32010== by 0x51B33FA: gmallocn(int, int, bool) (gmem.cc:212) ==32010== by 0x51B341E: gmallocn (gmem.cc:216) ==32010== by 0x51FB351: CharCodeToUnicode::addMapping(unsigned int, char*, int, int) (CharCodeToUnicode.cc:457) ==32010== by 0x51FAB21: CharCodeToUnicode::parseCMap1(int (*)(void*), void*, int) (CharCodeToUnicode.cc:346) ==32010== by 0x51FA750: CharCodeToUnicode::mergeCMap(GooString*, int) (CharCodeToUnicode.cc:292) ==32010== by 0x5230C11: GfxFont::readToUnicodeCMap(Dict*, int, CharCodeToUnicode*) (GfxFont.cc:602) ==32010== by 0x523359C: Gfx8BitFont::Gfx8BitFont(XRef*, char const*, Ref, GooString*, GfxFontType, Ref, Dict*) (GfxFont.cc:1302) ==32010== by 0x522F67C: GfxFont::makeFont(XRef*, char const*, Ref, Dict*) (GfxFont.cc:223) ==32010== by 0x5237912: GfxFontDict::GfxFontDict(XRef*, Ref*, Dict*) (GfxFont.cc:2498) ==32010== by 0x5213ACC: GfxResources::GfxResources(XRef*, Dict*, GfxResources*) (Gfx.cc:342) Needs some investigation
Created attachment 66919 [details] [review] free local allocated utf16 pointer Seems to come with the new UTF16toUCS4. The patch is not regtested by me, because it is obviously that the locally allocated utf16 pointer is never freed.
Oh sorry, this leak is in poppler-0.20 (Where your patch doesn't really apply)
(In reply to comment #2) > Oh sorry, this leak is in poppler-0.20 (Where your patch doesn't really > apply) Do I miss something? The leak is also in git master, where I just applied the patch without any changes successfully!
Pushed!
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.