Skip to content
Snippets Groups Projects
Commit b5ab6771 authored by Steven Luo's avatar Steven Luo Committed by Samuel Thibault
Browse files

slirp: don't crash when tcp_sockclosed() is called with a NULL tp


Signed-off-by: default avatarSteven Luo <steven+qemu@steven676.net>
Reviewed-by: default avatarEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
parent 7acbff99
No related branches found
No related tags found
No related merge requests found
......@@ -356,6 +356,10 @@ tcp_sockclosed(struct tcpcb *tp)
DEBUG_CALL("tcp_sockclosed");
DEBUG_ARG("tp = %p", tp);
if (!tp) {
return;
}
switch (tp->t_state) {
case TCPS_CLOSED:
......@@ -374,8 +378,7 @@ tcp_sockclosed(struct tcpcb *tp)
tp->t_state = TCPS_LAST_ACK;
break;
}
if (tp)
tcp_output(tp);
tcp_output(tp);
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment