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