mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-18 18:39:11 +08:00
[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>
This commit is contained in:
parent
a07fda3470
commit
0b966bfca0
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user