Set name_mapping to NULL after freeing

To avoid risk of double-free.
    
Fixes #237.
This commit is contained in:
Jonathan Kew 2020-04-28 16:50:49 +00:00
parent f3e049967e
commit 6edaaa4d18
1 changed files with 3 additions and 0 deletions

View File

@ -1627,7 +1627,10 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
}
}
if (!nm_share)
{
free (name_mapping);
name_mapping = NULL;
}
if (!nfamily && face->family_name &&
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->family_name, (FcChar8 *) "") != 0)