Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet tp could be null in tcp_respond()



details:   https://anonhg.NetBSD.org/src/rev/05c9dd1db4b2
branches:  trunk
changeset: 550850:05c9dd1db4b2
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Aug 22 22:27:07 2003 +0000

description:
tp could be null in tcp_respond()

diffstat:

 sys/netinet/tcp_subr.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 053a249c83e3 -r 05c9dd1db4b2 sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c    Fri Aug 22 22:11:44 2003 +0000
+++ b/sys/netinet/tcp_subr.c    Fri Aug 22 22:27:07 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_subr.c,v 1.149 2003/08/22 22:00:38 itojun Exp $    */
+/*     $NetBSD: tcp_subr.c,v 1.150 2003/08/22 22:27:07 itojun Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -98,7 +98,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.149 2003/08/22 22:00:38 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.150 2003/08/22 22:27:07 itojun Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -817,10 +817,10 @@
 #endif
        }
 
-       if (tp->t_inpcb)
+       if (tp && tp->t_inpcb)
                so = tp->t_inpcb->inp_socket;
 #ifdef INET6
-       else if (tp->t_in6pcb)
+       else if (tp && tp->t_in6pcb)
                so = tp->t_in6pcb->in6p_socket;
 #endif
        else



Home | Main Index | Thread Index | Old Index