summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 13f7320..96ad866 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -767,8 +767,11 @@ syncache_expand(inc, th, sop, m)
/*
* If seg contains an ACK, but not for our SYN/ACK, send a RST.
*/
- if (th->th_ack != sc->sc_iss + 1)
+ if (th->th_ack != sc->sc_iss + 1) {
+ if (sch == NULL)
+ syncache_free(sc);
return (0);
+ }
so = syncache_socket(sc, *sop, m);
if (so == NULL) {
OpenPOWER on IntegriCloud