diff options
author | kmacy <kmacy@FreeBSD.org> | 2008-12-16 06:01:08 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2008-12-16 06:01:08 +0000 |
commit | 222f4e20a8b598bffb1faf5a3963d48987f3ec2a (patch) | |
tree | 6832b796260f54eee203a151a7b04e6db0dabde4 /sys/netinet6/raw_ip6.c | |
parent | 7a3ee73de5b8b84eacf81efb4b3eefae05dee5d8 (diff) | |
download | FreeBSD-src-222f4e20a8b598bffb1faf5a3963d48987f3ec2a.zip FreeBSD-src-222f4e20a8b598bffb1faf5a3963d48987f3ec2a.tar.gz |
check pointers against NULL
Diffstat (limited to 'sys/netinet6/raw_ip6.c')
-rw-r--r-- | sys/netinet6/raw_ip6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 87e1e5a..0a0f1cd 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -232,7 +232,7 @@ rip6_input(struct mbuf **mp, int *offp, int proto) /* * Check AH/ESP integrity. */ - if (last && ipsec6_in_reject(m, last)) { + if ((last != NULL) && ipsec6_in_reject(m, last)) { m_freem(m); V_ipsec6stat.in_polvio++; V_ip6stat.ip6s_delivered--; @@ -357,7 +357,7 @@ rip6_output(m, va_alist) INP_WLOCK(in6p); dst = &dstsock->sin6_addr; - if (control) { + if (control != NULL) { if ((error = ip6_setpktopts(control, &opt, in6p->in6p_outputopts, so->so_cred, so->so_proto->pr_protocol)) != 0) { @@ -491,7 +491,7 @@ rip6_output(m, va_alist) m_freem(m); freectl: - if (control) { + if (control != NULL) { ip6_clearpktopts(&opt, -1); m_freem(control); } |