diff options
author | James Booth <boothj5@gmail.com> | 2013-09-23 01:19:54 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-09-23 01:19:54 +0100 |
commit | b738e8f363e3470eb97ac941d945194e19f3c198 (patch) | |
tree | 166bc440eb03c837a9272e3b1d9fc4797e81120e /src | |
parent | 25b274b8d1b322121edcfa4bf4cff6f03b9c820e (diff) | |
download | profani-tty-b738e8f363e3470eb97ac941d945194e19f3c198.tar.gz |
Moved free in parse_args_with_freetext
issue #226
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/parser.c b/src/tools/parser.c index 942b17ca..1ec539df 100644 --- a/src/tools/parser.c +++ b/src/tools/parser.c @@ -256,12 +256,12 @@ parse_args_with_freetext(const char * const inp, int min, int max) } } - free(copy); - if (in_token) { tokens = g_slist_append(tokens, g_strndup(token_start, token_size)); } + free(copy); + int num = g_slist_length(tokens) - 1; // if num args not valid return NULL |