summaryrefslogtreecommitdiffstats
path: root/slirp/tcp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'slirp/tcp_input.c')
-rw-r--r--slirp/tcp_input.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c
index 07bcbdb2dd..d073ef9525 100644
--- a/slirp/tcp_input.c
+++ b/slirp/tcp_input.c
@@ -429,11 +429,10 @@ findso:
if ((tiflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) != TH_SYN)
goto dropwithreset;
- if ((so = socreate(slirp)) == NULL)
- goto dropwithreset;
+ so = socreate(slirp);
if (tcp_attach(so) < 0) {
- free(so); /* Not sofree (if it failed, it's not insqued) */
- goto dropwithreset;
+ g_free(so); /* Not sofree (if it failed, it's not insqued) */
+ goto dropwithreset;
}
sbreserve(&so->so_snd, TCP_SNDSPACE);