From 0ceb7426c8f947ed404f51e3788f9adb550b9647 Mon Sep 17 00:00:00 2001 From: pef Date: Thu, 11 Nov 2021 09:12:23 +0000 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=86=85=E5=AD=98=E9=87=8A?= =?UTF-8?q?=E6=94=BE=E5=87=BD=E6=95=B0=E3=80=82=20=E3=80=90=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E3=80=91=20=E6=9C=89=E6=89=8B=E5=8A=A8=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=86=85=E5=AD=98=E5=9C=A8return=E5=89=8D=E6=9C=AA?= =?UTF-8?q?=E9=87=8A=E6=94=BE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【修改方案】 1. 添加free(fullpath),释放内存。 【影响】 对现有的产品编译不会有影响。 Change-Id: I9168bd78e9137fc764292a5faa6bc7e732f82e66 Signed-off-by: pef --- components/shell/src/cmds/vfs_shellcmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/shell/src/cmds/vfs_shellcmd.c b/components/shell/src/cmds/vfs_shellcmd.c index f5c065ba..7b6b4a75 100755 --- a/components/shell/src/cmds/vfs_shellcmd.c +++ b/components/shell/src/cmds/vfs_shellcmd.c @@ -278,6 +278,7 @@ INT32 OsShellCmdCat(INT32 argc, const CHAR **argv) if (fd == -1) { ret = -1; + free(fullpath); return ret; }