Fix potential memory leak in _get_real_paths_from_prefix
This commit is contained in:
parent
6f27f42e61
commit
fd3eebad74
|
@ -1299,12 +1299,17 @@ _get_real_paths_from_prefix(FcConfigParse *parse, const FcChar8 *path, const FcC
|
||||||
if (FcStrCmp (prefix, (const FcChar8 *) "xdg") == 0)
|
if (FcStrCmp (prefix, (const FcChar8 *) "xdg") == 0)
|
||||||
{
|
{
|
||||||
parent = FcConfigXdgDataHome ();
|
parent = FcConfigXdgDataHome ();
|
||||||
e = FcConfigXdgDataDirs ();
|
if (!parent)
|
||||||
if (!parent || !e)
|
|
||||||
{
|
{
|
||||||
/* Home directory might be disabled */
|
/* Home directory might be disabled */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
e = FcConfigXdgDataDirs ();
|
||||||
|
if (!e)
|
||||||
|
{
|
||||||
|
FcStrFree (parent);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (FcStrCmp (prefix, (const FcChar8 *) "default") == 0 ||
|
else if (FcStrCmp (prefix, (const FcChar8 *) "default") == 0 ||
|
||||||
FcStrCmp (prefix, (const FcChar8 *) "cwd") == 0)
|
FcStrCmp (prefix, (const FcChar8 *) "cwd") == 0)
|
||||||
|
|
Loading…
Reference in New Issue