Commit fd3eebad authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Fix potential memory leak in _get_real_paths_from_prefix

parent 6f27f42e
......@@ -1299,12 +1299,17 @@ _get_real_paths_from_prefix(FcConfigParse *parse, const FcChar8 *path, const FcC
if (FcStrCmp (prefix, (const FcChar8 *) "xdg") == 0)
{
parent = FcConfigXdgDataHome ();
e = FcConfigXdgDataDirs ();
if (!parent || !e)
if (!parent)
{
/* Home directory might be disabled */
return NULL;
}
e = FcConfigXdgDataDirs ();
if (!e)
{
FcStrFree (parent);
return NULL;
}
}
else if (FcStrCmp (prefix, (const FcChar8 *) "default") == 0 ||
FcStrCmp (prefix, (const FcChar8 *) "cwd") == 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