mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
parent
e7159aca30
commit
cb507497b6
@ -256,6 +256,8 @@ 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));
|
||||
}
|
||||
@ -265,7 +267,6 @@ parse_args_with_freetext(const char * const inp, int min, int max)
|
||||
// if num args not valid return NULL
|
||||
if ((num < min) || (num > max)) {
|
||||
g_slist_free_full(tokens, free);
|
||||
free(copy);
|
||||
return NULL;
|
||||
|
||||
// if min allowed is 0 and 0 found, return empty char* array
|
||||
@ -288,7 +289,6 @@ parse_args_with_freetext(const char * const inp, int min, int max)
|
||||
|
||||
args[arg_count] = NULL;
|
||||
g_slist_free_full(tokens, free);
|
||||
free(copy);
|
||||
|
||||
return args;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user