fix bug for close nonblocking socket crash

This commit is contained in:
xueyunfei
2019-10-29 16:14:49 +08:00
parent 32b1aaf280
commit f2bd195eed
+4
View File
@@ -445,6 +445,10 @@ tryget_socket_unconn_locked(int fd)
{
struct lwip_sock *ret = tryget_socket_unconn_nouse(fd);
if (ret != NULL) {
#if ESP_LWIP
if (ret->conn == NULL)
return NULL;
#endif /* ESP_LWIP */
if (!sock_inc_used_locked(ret)) {
return NULL;
}