[tcplp] fix bad memory access when refusing incoming TCP connection (#8291)

This commit is contained in:
Sam Kumar
2022-10-15 23:36:44 -07:00
committed by Jonathan Hui
parent bdb9382976
commit 3d1bdf3317
+1
View File
@@ -773,6 +773,7 @@ tcp_input(struct ip6_hdr* ip6, struct tcphdr* th, otMessage* msg, struct tcpcb*
}
if (tp == (struct tcpcb *) -1) {
rstreason = ECONNREFUSED;
tp = NULL;
goto dropwithreset;
}
tcp_state_change(tp, TCPS_SYN_RECEIVED);