提交 b5ab6771 编写于 作者: S Steven Luo 提交者: Samuel Thibault

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

Signed-off-by: NSteven Luo <steven+qemu@steven676.net>
Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: NSamuel Thibault <samuel.thibault@ens-lyon.org>
上级 7acbff99
......@@ -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);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册