From 4fd8acf0f3c2c7bd3b268502fe334369a25666da Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 15 Apr 2006 02:32:22 +0000 Subject: [PATCH] Coverity CID 1152: Add KASSERT before deref. --- sys/netinet/tcp_input.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 6d25cbf806fb..5732f84f72c5 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.239 2006/02/18 17:34:49 rpaulo Exp $ */ +/* $NetBSD: tcp_input.c,v 1.240 2006/04/15 02:32:22 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -150,7 +150,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.239 2006/02/18 17:34:49 rpaulo Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.240 2006/04/15 02:32:22 christos Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -1293,6 +1293,7 @@ findpcb: m_freem(in6p->in6p_options); in6p->in6p_options = 0; } + KASSERT(ip6 != NULL); ip6_savecontrol(in6p, &in6p->in6p_options, ip6, m); } #endif