Bug 1857285 - Free sanitized font data on early-out. r=aosmond

Differential Revision: https://phabricator.services.mozilla.com/D190409
This commit is contained in:
Emilio Cobos Álvarez 2023-10-09 07:28:25 +00:00
parent dd749e7f0b
commit 893dfc633c

View File

@ -686,6 +686,7 @@ bool gfxUserFontEntry::LoadPlatformFont(uint32_t aSrcIndex,
RefPtr<gfxUserFontSet> fontSet = GetUserFontSet();
if (NS_WARN_IF(!fontSet)) {
free((void*)aOriginalFontData);
free((void*)aSanitizedFontData);
return false;
}