fix: open接口内存泄漏修复

方案描述:
1, 修改路径正确时打开失败可能的异常

fix #I66KGT
Signed-off-by: wangchen <wangchen240@huawei.com>
This commit is contained in:
wangchen 2022-12-17 08:16:12 +00:00
parent 2a70466456
commit 0a03a4d875
1 changed files with 1 additions and 0 deletions

View File

@ -275,6 +275,7 @@ static int VfsOpen(const char *path, int flags)
fd = FileToFd(file);
file->fStatus = FILE_STATUS_READY; /* file now ready to use */
} else {
LOSCFG_FS_FREE_HOOK((void *)file->fullPath);
VfsFilePut(file);
}