Changes in uspace/app/bdsh/input.c [9d58539:3e6a98c5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/input.c
r9d58539 r3e6a98c5 41 41 #include <errno.h> 42 42 #include <assert.h> 43 #include < bool.h>43 #include <stdbool.h> 44 44 #include <tinput.h> 45 45 … … 67 67 int process_input(cliuser_t *usr) 68 68 { 69 token_t *tokens = calloc(WORD_MAX, sizeof(token_t));70 if (tokens == NULL)69 token_t *tokens_buf = calloc(WORD_MAX, sizeof(token_t)); 70 if (tokens_buf == NULL) 71 71 return ENOMEM; 72 token_t *tokens = tokens_buf; 72 73 73 74 char *cmd[WORD_MAX]; … … 80 81 81 82 if (usr->line == NULL) { 82 free(tokens );83 free(tokens_buf); 83 84 return CL_EFAIL; 84 85 } … … 213 214 } 214 215 tok_fini(&tok); 215 free(tokens );216 free(tokens_buf); 216 217 217 218 return rc; … … 268 269 if (rc != EOK) { 269 270 /* Error in communication with console */ 271 cli_quit = 1; 270 272 return; 271 273 }
Note:
See TracChangeset
for help on using the changeset viewer.