mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 06:40:25 +08:00
Update sal_socket.c
修复关闭socket时的Bug
This commit is contained in:
parent
b1bbf434a6
commit
8a9646b613
@ -697,9 +697,8 @@ int sal_closesocket(int socket)
|
||||
|
||||
if (sock->ops->closesocket((int) sock->user_data) == 0)
|
||||
{
|
||||
rt_free(sock);
|
||||
sock = RT_NULL;
|
||||
|
||||
rt_free(sock);
|
||||
socket_table.sockets[socket] = RT_NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user