projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7acbff9
)
slirp: don't crash when tcp_sockclosed() is called with a NULL tp
author
Steven Luo
<steven+qemu@steven676.net>
Thu, 7 Apr 2016 05:04:21 +0000
(22:04 -0700)
committer
Samuel Thibault
<samuel.thibault@ens-lyon.org>
Thu, 7 Apr 2016 08:27:22 +0000
(10:27 +0200)
Signed-off-by: Steven Luo <steven+qemu@steven676.net>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
slirp/tcp_subr.c
patch
|
blob
|
history
diff --git
a/slirp/tcp_subr.c
b/slirp/tcp_subr.c
index
dbfd2c6
..
32ff452
100644
(file)
--- a/
slirp/tcp_subr.c
+++ b/
slirp/tcp_subr.c
@@
-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);
}
/*