aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-08-23 13:14:28 +0200
committerMattias Andrée <maandree@operamail.com>2013-08-23 13:14:28 +0200
commit22048e6bb5b40fed72f76b7d9d4fafe329de8f17 (patch)
treef4fc06d68e87bd7c2111267eaea84b741a83b986
parentm (diff)
downloadargparser-22048e6bb5b40fed72f76b7d9d4fafe329de8f17.tar.gz
argparser-22048e6bb5b40fed72f76b7d9d4fafe329de8f17.tar.bz2
argparser-22048e6bb5b40fed72f76b7d9d4fafe329de8f17.tar.xz
mem lack
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/argparser.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/argparser.c b/src/argparser.c
index 07f99a3..7439f81 100644
--- a/src/argparser.c
+++ b/src/argparser.c
@@ -196,7 +196,12 @@ void args_dispose()
void** freethis = map_free(&args_opts);
long i = 0;
while (*(freethis + i))
- free(*(freethis + i++));
+ {
+ args_Array* value = *(freethis + i++);
+ if (value->values != null)
+ free(value->values);
+ free(value);
+ }
free(freethis);
}
}