From 9f47faff732609cf2249f104b94ed55f3ef133bb Mon Sep 17 00:00:00 2001 From: Far Date: Fri, 23 Apr 2021 15:28:44 +0800 Subject: [PATCH] fix: PathCacheFree try to free name field in struct PathCache The name field of struct PathCache is not allocated. It should not try to free it by free(nc->name) Close #I3NTH9 --- fs/vfs/path_cache.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/vfs/path_cache.c b/fs/vfs/path_cache.c index c76eab56..b60975ed 100644 --- a/fs/vfs/path_cache.c +++ b/fs/vfs/path_cache.c @@ -134,7 +134,6 @@ int PathCacheFree(struct PathCache *nc) LOS_ListDelete(&nc->hashEntry); LOS_ListDelete(&nc->parentEntry); LOS_ListDelete(&nc->childEntry); - free(nc->name); free(nc); return LOS_OK;