diff -urN poppler-0.33.0Base/poppler/GlobalParamsWin.cc poppler-0.33.0/poppler/GlobalParamsWin.cc --- poppler-0.33.0Base/poppler/GlobalParamsWin.cc 2014-02-09 17:10:32.000000000 +0200 +++ poppler-0.33.0/poppler/GlobalParamsWin.cc 2015-06-22 10:01:15.644808700 +0300 @@ -443,11 +443,14 @@ delete fontPath; } - if (displayFontTab[i].warnIfMissing) - error(errSyntaxError, -1, "No display font for '{0:s}'", fontName); + if (displayFontTab[i].warnIfMissing) { + error(errSyntaxError, -1, "No display font for '{0:s}'", displayFontTab[i].name); + delete fontName; + } } if (winFontDir[0]) { - sysFonts->scanWindowsFonts(new GooString(winFontDir)); + GooString gooWinFontsDir(winFontDir); + sysFonts->scanWindowsFonts(&gooWinFontsDir); } fileName = new GooString(dataRoot); @@ -468,32 +471,35 @@ obj1.free(); parser->getObj(&obj1); while (!obj1.isEOF()) { - parser->getObj(&obj2); - if (obj1.isName()) { - // Substitutions - if (obj2.isDict()) { - Object obj3; - obj2.getDict()->lookup("Path", &obj3); - if (obj3.isString()) - addFontFile(new GooString(obj1.getName()), obj3.getString()->copy()); - obj3.free(); - // Aliases - } else if (obj2.isName()) { - substFiles->add(new GooString(obj1.getName()), new GooString(obj2.getName())); - } - } - obj2.free(); - obj1.free(); - parser->getObj(&obj1); - // skip trailing ';' - while (obj1.isCmd(";")) { - obj1.free(); - parser->getObj(&obj1); - } + parser->getObj(&obj2); + if (obj1.isName()) { + // Substitutions + if (obj2.isDict()) { + Object obj3; + obj2.getDict()->lookup("Path", &obj3); + if (obj3.isString()) + addFontFile(new GooString(obj1.getName()), obj3.getString()->copy()); + obj3.free(); + // Aliases + } else if (obj2.isName()) { + substFiles->add(new GooString(obj1.getName()), new GooString(obj2.getName())); + } + } + obj2.free(); + obj1.free(); + parser->getObj(&obj1); + // skip trailing ';' + while (obj1.isCmd(";")) { + obj1.free(); + parser->getObj(&obj1); + } } delete file; delete parser; } + else { + delete fileName; + } } static const char *findSubstituteName(GfxFont *font, GooHash *fontFiles,