diff --git a/components/shell/src/cmds/vfs_shellcmd.c b/components/shell/src/cmds/vfs_shellcmd.c index 35cc6b1d..19cabb25 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 {