diff options
-rw-r--r-- | src/socket.c | 4 | ||||
-rw-r--r-- | src/tcp_subr.c | 3 | ||||
-rw-r--r-- | src/udp.c | 3 |
3 files changed, 4 insertions, 6 deletions
diff --git a/src/socket.c b/src/socket.c index 8aa942e..f071d69 100644 --- a/src/socket.c +++ b/src/socket.c @@ -84,6 +84,10 @@ void sofree(struct socket *so) { Slirp *slirp = so->slirp; + if (so->s_aux != -1) { + closesocket(so->s_aux); + } + soqfree(so, &slirp->if_fastq); soqfree(so, &slirp->if_batchq); diff --git a/src/tcp_subr.c b/src/tcp_subr.c index 8feff5b..636c447 100644 --- a/src/tcp_subr.c +++ b/src/tcp_subr.c @@ -339,9 +339,6 @@ struct tcpcb *tcp_close(struct tcpcb *tp) slirp->tcp_last_so = &slirp->tcb; so->slirp->cb->unregister_poll_fd(so->s, so->slirp->opaque); closesocket(so->s); - if (so->s_aux != -1) { - closesocket(so->s_aux); - } sbfree(&so->so_rcv); sbfree(&so->so_snd); sofree(so); @@ -339,9 +339,6 @@ void udp_detach(struct socket *so) { so->slirp->cb->unregister_poll_fd(so->s, so->slirp->opaque); closesocket(so->s); - if (so->s_aux != -1) { - closesocket(so->s_aux); - } sofree(so); } |