mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-15 22:49:16 +00:00
sockets: fix socket leak when using setsockopt/getsockopt hook with LWIP_NETCONN_FULLDUPLEX==1
see bug #63458
This commit is contained in:
parent
583f352f60
commit
90a440eafd
@ -2977,6 +2977,7 @@ lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *opt
|
|||||||
|
|
||||||
#ifdef LWIP_HOOK_SOCKETS_GETSOCKOPT
|
#ifdef LWIP_HOOK_SOCKETS_GETSOCKOPT
|
||||||
if (LWIP_HOOK_SOCKETS_GETSOCKOPT(s, sock, level, optname, optval, optlen, &err)) {
|
if (LWIP_HOOK_SOCKETS_GETSOCKOPT(s, sock, level, optname, optval, optlen, &err)) {
|
||||||
|
done_socket(sock);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -3398,6 +3399,7 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
|
|||||||
|
|
||||||
#ifdef LWIP_HOOK_SOCKETS_SETSOCKOPT
|
#ifdef LWIP_HOOK_SOCKETS_SETSOCKOPT
|
||||||
if (LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, &err)) {
|
if (LWIP_HOOK_SOCKETS_SETSOCKOPT(s, sock, level, optname, optval, optlen, &err)) {
|
||||||
|
done_socket(sock);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user