summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-25 12:21:42 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-25 12:21:42 -0300
commit705347f538ed010103b6e1757fd962ee439f393d (patch)
treec82b212bec5699f014debb59e6d1a65330d872bf
parent58e2928b8d97ba7e0d9fcf8fc3d8fc3c3de72437 (diff)
downloadeeshow-705347f538ed010103b6e1757fd962ee439f393d.tar.gz
eeshow-705347f538ed010103b6e1757fd962ee439f393d.tar.bz2
eeshow-705347f538ed010103b6e1757fd962ee439f393d.zip
main.c (main): free file names (give valgrind something to trip over)
-rw-r--r--main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.c b/main.c
index d4989e1..f6dfd60 100644
--- a/main.c
+++ b/main.c
@@ -265,6 +265,9 @@ int main(int argc, char **argv)
file_names.pro ? &pro_file : &sch_file))
return 1;
+ if (file_names.pro)
+ file_close(&pro_file);
+
if (fn->pl) {
struct file file;
@@ -276,6 +279,12 @@ int main(int argc, char **argv)
return 1;
}
+ if (fn != &file_names) {
+ free_file_names(fn);
+ free(fn);
+ }
+ free_file_names(&file_names);
+
if (dashdash == argc) {
gfx_argc = 1;
gfx_argv = alloc_type_n(char *, 2);