Skip to content

Commit

Permalink
sockets: fix socket leak when using setsockopt/getsockopt hook with L…
Browse files Browse the repository at this point in the history
…WIP_NETCONN_FULLDUPLEX==1

see bug #63458
  • Loading branch information
goldsimon committed Oct 11, 2023
1 parent 583f352 commit 90a440e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 90a440e

Please sign in to comment.