Changes in uspace/app/bdsh/input.c [b2727f18:b48d046] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/input.c
rb2727f18 rb48d046 67 67 int process_input(cliuser_t *usr) 68 68 { 69 token_t *tokens = calloc(WORD_MAX, sizeof(token_t)); 70 if (tokens == NULL) 71 return ENOMEM; 72 69 73 char *cmd[WORD_MAX]; 70 token_t tokens_space[WORD_MAX];71 token_t *tokens = tokens_space;72 74 int rc = 0; 73 75 tokenizer_t tok; … … 77 79 char *redir_to = NULL; 78 80 79 if (NULL == usr->line) 81 if (usr->line == NULL) { 82 free(tokens); 80 83 return CL_EFAIL; 84 } 81 85 82 86 rc = tok_init(&tok, usr->line, tokens, WORD_MAX); … … 209 213 } 210 214 tok_fini(&tok); 215 free(tokens); 211 216 212 217 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.