From 0b966bfca0bc369c0f8cc1fdd7ad7155ef4d0384 Mon Sep 17 00:00:00 2001 From: Fan YANG Date: Fri, 14 Jul 2023 15:26:53 +0800 Subject: [PATCH] [components][net][sal][socket] Fix duplicate free on allocated buffer - Avoid duplicate free as the d->vnode will be freed in the fd_release API call Signed-off-by: Fan YANG --- components/net/sal/socket/net_sockets.c | 1 - 1 file changed, 1 deletion(-) diff --git a/components/net/sal/socket/net_sockets.c b/components/net/sal/socket/net_sockets.c index 53b783fee0..8f53e744c7 100644 --- a/components/net/sal/socket/net_sockets.c +++ b/components/net/sal/socket/net_sockets.c @@ -264,7 +264,6 @@ int socket(int domain, int type, int protocol) } else { - rt_free(d->vnode); /* release fd */ fd_release(fd); rt_set_errno(-ENOMEM);