diff --git a/components/shell/src/cmds/vfs_shellcmd.c b/components/shell/src/cmds/vfs_shellcmd.c index 801f6e99e321606a28962fb38a5735d085ebd0f7..e7f68345fea08bf1880f41ea55f80ce06da2ad57 100644 --- a/components/shell/src/cmds/vfs_shellcmd.c +++ b/components/shell/src/cmds/vfs_shellcmd.c @@ -181,6 +181,7 @@ VOID OsLs(const CHAR *pathname) d = opendir(path); if (d == NULL) { PRINT_ERR("No such directory = %s\n", path); + free(path); } else { PRINTK("Directory %s:\n", path); do {