瀏覽代碼

[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 <fan.yang@hpmicro.com>
Fan YANG 1 年之前
父節點
當前提交
0b966bfca0
共有 1 個文件被更改,包括 0 次插入1 次删除
  1. 0 1
      components/net/sal/socket/net_sockets.c

+ 0 - 1
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);