1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Free tokens when 0 supplied an 0 min, parse_args_with_freetext

This commit is contained in:
James Booth 2014-06-17 22:30:51 +01:00
parent acc4a00d78
commit ecedca8a95

View File

@ -278,6 +278,7 @@ parse_args_with_freetext(const char * const inp, int min, int max, gboolean *res
// if min allowed is 0 and 0 found, return empty char* array
} else if (min == 0 && num == 0) {
g_slist_free_full(tokens, free);
gchar **args = malloc((num + 1) * sizeof(*args));
args[0] = NULL;
*result = TRUE;