commit | 8a98e6f756c7e6a4171e7dee563f0efbb28b9f33 | [log] [tgz] |
---|---|---|
author | Petr Machata <pmachata@redhat.com> | Sat Oct 27 00:30:13 2012 +0200 |
committer | Petr Machata <pmachata@redhat.com> | Sat Oct 27 00:30:13 2012 +0200 |
tree | 4b28d85e5efe25fa1a908ebc3231f14a991d8367 | |
parent | 47d70f6efd145113ad555dd2ba542d1050bbb784 [diff] [blame] |
Fix memory handling of -F arguments This plugs a leak.
diff --git a/libltrace.c b/libltrace.c index 214b332..7c74c50 100644 --- a/libltrace.c +++ b/libltrace.c
@@ -127,7 +127,12 @@ } else { read_config_file(opt_F->filename); } - opt_F = opt_F->next; + + struct opt_F_t *next = opt_F->next; + if (opt_F->own_filename) + free(opt_F->filename); + free(opt_F); + opt_F = next; } if (command) { /* Check that the binary ABI is supported before