diff --git a/components/fs/vfs/vfs_fs.c b/components/fs/vfs/vfs_fs.c index 840b53c2..daf1ee8e 100644 --- a/components/fs/vfs/vfs_fs.c +++ b/components/fs/vfs/vfs_fs.c @@ -670,7 +670,7 @@ static DIR *VfsOpendir(const char *path) if (g_dirNum >= LOSCFG_MAX_OPEN_DIRS) { VFS_ERRNO_SET(ENFILE); VfsUnlock(); - free(dir); + LOSCFG_FS_FREE_HOOK(dir); return NULL; }