Revert rev. 1.94. After recent tcp backouts, tcp_close() may return NULL.

Check the return value of tcp_close() being NULL before dereferencing it
in #ifdef TCPDEBUG block.

Reviewed by:	rwatson
Approved by:	re (gnn)
This commit is contained in:
kib 2007-09-24 14:46:27 +00:00
parent b555b05b37
commit dd74194c9c

View File

@ -240,7 +240,7 @@ tcp_timer_2msl(void *xtp)
}
#ifdef TCPDEBUG
if (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)
if (tp != NULL && (tp->t_inpcb->inp_socket->so_options & SO_DEBUG))
tcp_trace(TA_USER, ostate, tp, (void *)0, (struct tcphdr *)0,
PRU_SLOWTIMO);
#endif