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;
|
||||
}
|
||||
}
|
||||
arglist = FcStrListCreate (args);
|
||||
if (!arglist)
|
||||
{
|
||||
fprintf (stderr, "%s: malloc failure\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -341,6 +335,7 @@ main (int argc, char **argv)
|
|||
fprintf (stderr, "%s: malloc failure\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
FcStrSetDestroy (args);
|
||||
|
||||
while ((arg = FcStrListNext (arglist)))
|
||||
{
|
||||
|
@ -385,6 +380,7 @@ main (int argc, char **argv)
|
|||
if (cache_file)
|
||||
FcStrFree (cache_file);
|
||||
}
|
||||
FcStrListDone (arglist);
|
||||
|
||||
FcFini ();
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue