sockets: fix socket leak when using setsockopt/getsockopt hook with LWIP_NETCONN_FULLDUPLEX==1

see bug #63458
This commit is contained in:
Simon Goldschmidt 2023-10-11 21:23:32 +02:00
parent 583f352f60
commit 90a440eafd

View File

@ -2977,6 +2977,7 @@ lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *opt
#ifdef LWIP_HOOK_SOCKETS_GETSOCKOPT
if (LWIP_HOOK_SOCKETS_GETSOCKOPT(s, sock, level, optname, optval, optlen, &err)) {
done_socket(sock);
return err;
}
#endif
@ -3398,6 +3399,7 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
#ifdef LWIP_HOOK_SOCKETS_SETSOCKOPT
if (LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, &err)) {
done_socket(sock);
return err;
}
#endif