Fix the memory leak in fc-cat
This commit is contained in:
parent
23e88d8c6a
commit
eb2689c67b
|
@ -316,12 +316,6 @@ main (int argc, char **argv)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arglist = FcStrListCreate (args);
|
|
||||||
if (!arglist)
|
|
||||||
{
|
|
||||||
fprintf (stderr, "%s: malloc failure\n", argv[0]);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -341,6 +335,7 @@ main (int argc, char **argv)
|
||||||
fprintf (stderr, "%s: malloc failure\n", argv[0]);
|
fprintf (stderr, "%s: malloc failure\n", argv[0]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
FcStrSetDestroy (args);
|
||||||
|
|
||||||
while ((arg = FcStrListNext (arglist)))
|
while ((arg = FcStrListNext (arglist)))
|
||||||
{
|
{
|
||||||
|
@ -385,6 +380,7 @@ main (int argc, char **argv)
|
||||||
if (cache_file)
|
if (cache_file)
|
||||||
FcStrFree (cache_file);
|
FcStrFree (cache_file);
|
||||||
}
|
}
|
||||||
|
FcStrListDone (arglist);
|
||||||
|
|
||||||
FcFini ();
|
FcFini ();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue