diff --git a/components/shell/src/base/shmsg.c b/components/shell/src/base/shmsg.c index 67a82aaf..f30472e4 100644 --- a/components/shell/src/base/shmsg.c +++ b/components/shell/src/base/shmsg.c @@ -157,6 +157,7 @@ STATIC VOID ParseAndExecCmdline(CmdParsed *cmdParsed, const CHAR *cmdline, UINT3 ret = ShellMsgTypeGet(cmdParsed, cmdName); if (ret != LOS_OK) { PRINTK("%s:command not found\n", cmdName); + free(cmdName); return; }