parse: lex: fix memory leaks
This commit is contained in:
@@ -41,6 +41,8 @@ void bshell_lex_token_destroy(struct bshell_lex_token *tok)
|
||||
switch (tok->tok_type) {
|
||||
case BSHELL_TOK_WORD:
|
||||
case BSHELL_TOK_FLAG:
|
||||
case BSHELL_TOK_VAR:
|
||||
case BSHELL_TOK_VAR_SPLAT:
|
||||
case BSHELL_TOK_STRING:
|
||||
if (tok->tok_str) {
|
||||
free(tok->tok_str);
|
||||
|
||||
Reference in New Issue
Block a user