зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1553228 - Don't free result of FcPatternGetString. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D38157 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3de8b088e1
Коммит
ac4f9f002c
|
@ -1650,10 +1650,11 @@ void gfxFcPlatformFontList::ReadSystemFontList(
|
|||
family->AddFacesToFontList([&](FcPattern* aPat, bool aAppFonts) {
|
||||
char* s = (char*)FcNameUnparse(aPat);
|
||||
nsDependentCString patternStr(s);
|
||||
char* file = nullptr;
|
||||
if (FcResultMatch ==
|
||||
FcPatternGetString(aPat, FC_FILE, 0, (FcChar8**)&s)) {
|
||||
FcPatternGetString(aPat, FC_FILE, 0, (FcChar8**)&file)) {
|
||||
patternStr.Append(":file=");
|
||||
patternStr.Append(s);
|
||||
patternStr.Append(file);
|
||||
}
|
||||
retValue->AppendElement(FontPatternListEntry(patternStr, aAppFonts));
|
||||
free(s);
|
||||
|
|
Загрузка…
Ссылка в новой задаче