diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-06-26 00:17:33 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-06-26 00:17:33 +0200 |
commit | 8f0f38f78e7823887630d9f6ff85f2b7bea97646 (patch) | |
tree | 587a2180d18a17be15526663e01ddd0361d8c405 /src/argparser.c | |
parent | whoops (diff) | |
download | argparser-8f0f38f78e7823887630d9f6ff85f2b7bea97646.tar.gz argparser-8f0f38f78e7823887630d9f6ff85f2b7bea97646.tar.bz2 argparser-8f0f38f78e7823887630d9f6ff85f2b7bea97646.tar.xz |
free the maps
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/argparser.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/argparser.c b/src/argparser.c index 626bf03..274091e 100644 --- a/src/argparser.c +++ b/src/argparser.c @@ -272,6 +272,18 @@ extern void args_dispose() free(args_freequeue); args_freequeue = null; } + + if (args_optmap.keys != null) + free(args_map_free(&args_optmap)); + + if (args_opts.keys != null) + { + void** freethis = args_map_free(&args_opts); + long i; + while (*(freethis + i)) + free(*(freethis + i++)); + free(freethis); + } } |