补充内存释放函数。

【背景】
有手动申请内存在return前未释放。

【修改方案】
1. 添加free(fullpath),释放内存。

【影响】
 对现有的产品编译不会有影响。

Change-Id: I9168bd78e9137fc764292a5faa6bc7e732f82e66
Signed-off-by: pef <cyd1997@126.com>
This commit is contained in:
pef 2021-11-11 09:12:23 +00:00
parent 942c614995
commit 0ceb7426c8
1 changed files with 1 additions and 0 deletions

View File

@ -278,6 +278,7 @@ INT32 OsShellCmdCat(INT32 argc, const CHAR **argv)
if (fd == -1) { if (fd == -1) {
ret = -1; ret = -1;
free(fullpath);
return ret; return ret;
} }