Fix a memory leak in FcFreeTypeQuery*()

Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/170
This commit is contained in:
Akira TAGOH 2019-07-26 04:59:54 +00:00
parent 1a0391c099
commit e2f9f28aed
1 changed files with 8 additions and 3 deletions

View File

@ -2121,9 +2121,14 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
free (foundry_);
if (master)
{
/* TODO: How to free master?! */
}
{
#ifdef HAVE_FT_DONE_MM_VAR
if (face->glyph)
FT_Done_MM_Var (face->glyph->library, master);
#else
free (master);
#endif
}
return pat;