diff options
author | Akira TAGOH <akira@tagoh.org> | 2014-08-12 18:53:04 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2014-08-12 18:53:04 +0900 |
commit | eb2689c67ba2da969d33be43a05af1e8975e9837 (patch) | |
tree | 66b4a03e6b28e4f253fd0cd9702a0fe1cd3675cd /fc-cat | |
parent | 23e88d8c6a5d3d0a9526a3f3217bd33a7607cbab (diff) |
Fix the memory leak in fc-cat
Diffstat (limited to 'fc-cat')
-rw-r--r-- | fc-cat/fc-cat.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fc-cat/fc-cat.c b/fc-cat/fc-cat.c index 3a303c2d..f0131b6d 100644 --- a/fc-cat/fc-cat.c +++ b/fc-cat/fc-cat.c @@ -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; |