fix:修复OsLs函数内存泄漏问题
当d = NULL时,path没有释放,现释放path所指向的内存 close #I6A07U Signed-off-by: yinjiaming <yinjiaming@huawei.com> Change-Id: Iee9fd8d2171c6fdcf353a48e7af385bbd1660520
This commit is contained in:
parent
6134d4bd22
commit
9a4e9677bd
|
@ -181,6 +181,7 @@ VOID OsLs(const CHAR *pathname)
|
||||||
d = opendir(path);
|
d = opendir(path);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
PRINT_ERR("No such directory = %s\n", path);
|
PRINT_ERR("No such directory = %s\n", path);
|
||||||
|
free(path);
|
||||||
} else {
|
} else {
|
||||||
PRINTK("Directory %s:\n", path);
|
PRINTK("Directory %s:\n", path);
|
||||||
do {
|
do {
|
||||||
|
|
Loading…
Reference in New Issue