Changeset ec7f8b1 in mainline for uspace/app/bdsh/input.c
- Timestamp:
- 2011-08-21T15:35:03Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bb74dabe
- Parents:
- c4a8e4a (diff), 5935c079 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/input.c
rc4a8e4a rec7f8b1 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.