Update sockets.c

1、更正lwip_accept()中调用netconn_peer()失败时,netconn_delete()会被调用两次,从而导致进入rt_assert_handler()错误。
原因:(https://savannah.nongnu.org/bugs/?55536) bug #55536: lwIP 2.1.2: netconn_delete() called twice from lwip_accept()
This commit is contained in:
ImFovery 2021-07-29 10:08:39 +08:00 committed by GitHub
parent 1f15479466
commit 406cebe735
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -710,7 +710,7 @@ lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen)
err = netconn_peer(newconn, &naddr, &port);
if (err != ERR_OK) {
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_accept(%d): netconn_peer failed, err=%d\n", s, err));
netconn_delete(newconn);
//netconn_delete(newconn);
free_socket(nsock, 1);
sock_set_errno(sock, err_to_errno(err));
done_socket(sock);