From 8f0f38f78e7823887630d9f6ff85f2b7bea97646 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 26 Jun 2013 00:17:33 +0200 Subject: free the maps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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); + } } -- cgit v1.2.3-70-g09d2