summaryrefslogtreecommitdiff
path: root/avr/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'avr/cli.c')
-rw-r--r--avr/cli.c4
1 files changed, 2 insertions, 2 deletions
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;