Commit 6edaaa4d authored by Jonathan Kew's avatar Jonathan Kew

Set name_mapping to NULL after freeing

To avoid risk of double-free.
    
Fixes #237.
parent f3e04996
Pipeline #145324 passed with stage
in 6 minutes and 28 seconds
...@@ -1627,7 +1627,10 @@ FcFreeTypeQueryFaceInternal (const FT_Face face, ...@@ -1627,7 +1627,10 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
} }
} }
if (!nm_share) if (!nm_share)
{
free (name_mapping); free (name_mapping);
name_mapping = NULL;
}
if (!nfamily && face->family_name && if (!nfamily && face->family_name &&
FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->family_name, (FcChar8 *) "") != 0) FcStrCmpIgnoreBlanksAndCase ((FcChar8 *) face->family_name, (FcChar8 *) "") != 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment