mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-10-22 15:38:17 +00:00
fix bug for crash when socket lock not initialized
This commit is contained in:
@@ -465,6 +465,10 @@ tryget_socket_unconn(int fd)
|
||||
{
|
||||
struct lwip_sock *ret = tryget_socket_unconn_nouse(fd);
|
||||
if (ret != NULL) {
|
||||
#if ESP_LWIP_LOCK
|
||||
if (ret->conn == NULL)
|
||||
return NULL;
|
||||
#endif /* ESP_LWIP_LOCK */
|
||||
if (!sock_inc_used(ret)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user