Changeset ec7f8b1 in mainline for uspace/app/bdsh/input.c


Ignore:
Timestamp:
2011-08-21T15:35:03Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/input.c

    rc4a8e4a rec7f8b1  
    6767int process_input(cliuser_t *usr)
    6868{
     69        token_t *tokens = calloc(WORD_MAX, sizeof(token_t));
     70        if (tokens == NULL)
     71                return ENOMEM;
     72       
    6973        char *cmd[WORD_MAX];
    70         token_t tokens_space[WORD_MAX];
    71         token_t *tokens = tokens_space;
    7274        int rc = 0;
    7375        tokenizer_t tok;
     
    7779        char *redir_to = NULL;
    7880
    79         if (NULL == usr->line)
     81        if (usr->line == NULL) {
     82                free(tokens);
    8083                return CL_EFAIL;
     84        }
    8185
    8286        rc = tok_init(&tok, usr->line, tokens, WORD_MAX);
     
    209213        }
    210214        tok_fini(&tok);
     215        free(tokens);
    211216
    212217        return rc;
Note: See TracChangeset for help on using the changeset viewer.