Commit 37c9c16d authored by Akira TAGOH's avatar Akira TAGOH

Fix memory leak

parent 433718fb
......@@ -2190,6 +2190,7 @@ FcParseCacheDir (FcConfigParse *parse)
if (!data)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
data = prefix;
goto bail;
}
if (prefix)
......@@ -2201,7 +2202,7 @@ FcParseCacheDir (FcConfigParse *parse)
if (!p)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
data = prefix;
FcStrFree (prefix);
goto bail;
}
prefix = p;
......@@ -2233,6 +2234,7 @@ FcParseCacheDir (FcConfigParse *parse)
else if (strcmp ((const char *) data, "WINDOWSTEMPDIR_FONTCONFIG_CACHE") == 0)
{
int rc;
FcStrFree (data);
data = malloc (1000);
if (!data)
......
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