From 55027f3b53e5250768632efdd470c9e938e883e7 Mon Sep 17 00:00:00 2001 From: Leo C Date: Fri, 29 Aug 2014 23:03:44 +0200 Subject: env in ram --- avr/cli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'avr/cli.c') diff --git a/avr/cli.c b/avr/cli.c index f0dd154..be5df40 100644 --- a/avr/cli.c +++ b/avr/cli.c @@ -181,9 +181,9 @@ static int cli_run_command(const char *cmd, int flag) if (!cmd || !*cmd) return -1; /* empty command */ - finaltoken = xmalloc(CONFIG_SYS_CBSIZE); cmdbuf = strdup(cmd); - if (!cmdbuf) + finaltoken = xmalloc(CONFIG_SYS_CBSIZE); + if (!finaltoken) return -1; /* not enough memory */ str = cmdbuf; -- cgit v1.2.3