Fix memory leaks

This commit is contained in:
Akira TAGOH 2020-02-19 17:05:20 +09:00
parent 71d6866d38
commit 61573ad5f7
1 changed files with 13 additions and 0 deletions

View File

@ -2200,6 +2200,17 @@ bail2:
FcCharSetDestroy (cs);
bail1:
FcPatternDestroy (pat);
if (master)
{
#ifdef HAVE_FT_DONE_MM_VAR
if (face->glyph)
FT_Done_MM_Var (face->glyph->library, master);
#else
free (master);
#endif
}
if (!nm_share && name_mapping)
free (name_mapping);
if (foundry_)
free (foundry_);
bail0:
@ -2360,6 +2371,8 @@ bail:
if (face)
FT_Done_Face (face);
FT_Done_FreeType (ftLibrary);
if (nm)
free (nm);
return ret;
}