Created attachment 116648 [details] This is suggested patch/fix for poppler/SplashOutputDev.cc This fontsrc local variable in SplashOutputDev::doUpdateFont leaks memory. I don't really undestand the code, however, looks like it just needs to be unreferenced regardless of if it is file. Attached is the patch for poppler/SplashOutputDev.cc
I guess this is a windows only problem, for the rest of platforms we're already unref'ing it in SplashFontEngine::load* inside a #ifndef _WIN32 If we add that unref wholesale as you suggest we're double freeing in non windows platforms so you'll need to propose a better patch, either adding the unref only for windows or seeing if we can actually remove those #ifndef _WIN32 in the SplashFontEngine::load* functions
Removing the ifndef for windows worked fine for me. I haven't run all the test, though (only some set of files we need), but I can't see why windows is any different here.
Created attachment 116992 [details] patch for SplashFontEngine.cc unref is back to windows It leaked under windows without this unref and works fine (at least for some fonts) with it.
i have no way to test this, so i'll just trust you Pushed
Thanks. I'm quite confident it at least will not make things worse. I'd like to help if something will go wrong, but I'm unlikely to monitor poppler bugs, just will stay subscribed to this.
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.