aboutsummaryrefslogtreecommitdiffstats
path: root/src/argparser.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-08-23 13:00:12 +0200
committerMattias Andrée <maandree@operamail.com>2013-08-23 13:00:12 +0200
commit8d1a04e6209d62517ed9bb058a679049c5bf4ae8 (patch)
treecd114d396520f5e19d750e6b31a445cf0a3531b6 /src/argparser.c
parentmem fault (diff)
downloadargparser-8d1a04e6209d62517ed9bb058a679049c5bf4ae8.tar.gz
argparser-8d1a04e6209d62517ed9bb058a679049c5bf4ae8.tar.bz2
argparser-8d1a04e6209d62517ed9bb058a679049c5bf4ae8.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/argparser.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/argparser.c b/src/argparser.c
index 11be506..07f99a3 100644
--- a/src/argparser.c
+++ b/src/argparser.c
@@ -190,21 +190,15 @@ void args_dispose()
args_freequeue = null;
}
- if (args_optmap.keys != null)
- free(map_free(&args_optmap));
- else
- free(args_optmap.data);
+ free(map_free(&args_optmap));
- if (args_opts.keys != null)
- {
- void** freethis = map_free(&args_opts);
- long i = 0;
- while (*(freethis + i))
- free(*(freethis + i++));
- free(freethis);
- }
- else
- free(args_opts.data);
+ {
+ void** freethis = map_free(&args_opts);
+ long i = 0;
+ while (*(freethis + i))
+ free(*(freethis + i++));
+ free(freethis);
+ }
}