mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 17:45:13 +08:00
Update sal_socket.c
修复关闭socket时的Bug
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user