!970 【回合monthly_1018】open接口内存泄漏优化

Merge pull request !970 from wangchen/1217_1018
This commit is contained in:
openharmony_ci 2022-12-19 07:02:08 +00:00 committed by Gitee
commit 8541f81c1e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
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);
}