fix: 回合1018 open接口内存泄漏修复
方案描述: 1, 修改路径正确时打开失败可能的异常 fix #I66KHK Signed-off-by: wangchen <wangchen240@huawei.com>
This commit is contained in:
parent
eb08c1744d
commit
2bc508bdd3
|
@ -267,6 +267,7 @@ static int VfsOpen(const char *path, int flags)
|
||||||
fd = FileToFd(file);
|
fd = FileToFd(file);
|
||||||
file->fStatus = FILE_STATUS_READY; /* file now ready to use */
|
file->fStatus = FILE_STATUS_READY; /* file now ready to use */
|
||||||
} else {
|
} else {
|
||||||
|
LOSCFG_FS_FREE_HOOK((void *)file->fullPath);
|
||||||
VfsFilePut(file);
|
VfsFilePut(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue