aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2021-03-29 13:48:22 -0700
committerDoug Evans <dje@google.com>2021-03-29 13:48:22 -0700
commit0d90aa7c20abe2d96dd3b1eebe4584cba7f260e8 (patch)
tree3c8cbfd610c26a2fbc183656a0e588c233df3e38
parent9aaa17b530325d13dfaab293f5406ee8017d12e6 (diff)
downloadslirp-0d90aa7c20abe2d96dd3b1eebe4584cba7f260e8.zip
slirp-0d90aa7c20abe2d96dd3b1eebe4584cba7f260e8.tar.gz
slirp-0d90aa7c20abe2d96dd3b1eebe4584cba7f260e8.tar.bz2
tcpx_listen: tcp_newtcpcb doesn't fail
Signed-off-by: Doug Evans <dje@google.com>
-rw-r--r--src/socket.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/socket.c b/src/socket.c
index 679ac4f..fc64b8f 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -763,10 +763,7 @@ struct socket *tcpx_listen(Slirp *slirp,
so = socreate(slirp);
/* Don't tcp_attach... we don't need so_snd nor so_rcv */
- if ((so->so_tcpcb = tcp_newtcpcb(so)) == NULL) {
- g_free(so);
- return NULL;
- }
+ so->so_tcpcb = tcp_newtcpcb(so);
insque(so, &slirp->tcb);
/*