mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
tokenize: reset *argv = NULL on error
This allows the caller to call free() without having to worry about whether it has already been free:d or not. Closes #49.
This commit is contained in:
parent
80741371c9
commit
22cd25d360
1 changed files with 1 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ tokenize_cmdline(char *cmdline, char ***argv)
|
|||
if (delim != ' ') {
|
||||
LOG_ERR("unterminated %s quote\n", delim == '"' ? "double" : "single");
|
||||
free(*argv);
|
||||
*argv = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue