Browse Source

[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 year ago
parent
commit
0b966bfca0
1 changed files with 0 additions and 1 deletions
  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
     else
     {
     {
-        rt_free(d->vnode);
         /* release fd */
         /* release fd */
         fd_release(fd);
         fd_release(fd);
         rt_set_errno(-ENOMEM);
         rt_set_errno(-ENOMEM);