summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2014-10-12 17:08:44 +0000
committercy <cy@FreeBSD.org>2014-10-12 17:08:44 +0000
commitc5a5359e13aff9d31581da89d0a35c3572dc0628 (patch)
tree2c076069ec82e8b9bb551747c1e01e284a595ef4 /sys/contrib
parent2e9b5f450dab8f9cf832a197401c12c9c09ab3bc (diff)
downloadFreeBSD-src-c5a5359e13aff9d31581da89d0a35c3572dc0628.zip
FreeBSD-src-c5a5359e13aff9d31581da89d0a35c3572dc0628.tar.gz
MFC r271980
Check for NULL before de-refencing; in particular sel is assigned to NULL, in the default case, and then couple of lines down we do sel-> Obtained from: NetBSD CVS repo (r1.5)
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/ipfilter/netinet/ip_dstlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_dstlist.c b/sys/contrib/ipfilter/netinet/ip_dstlist.c
index ce2e72e..d516556 100644
--- a/sys/contrib/ipfilter/netinet/ip_dstlist.c
+++ b/sys/contrib/ipfilter/netinet/ip_dstlist.c
@@ -1134,7 +1134,7 @@ ipf_dstlist_select(fin, d)
int family;
int x;
- if (d->ipld_dests == NULL || *d->ipld_dests == NULL)
+ if (d == NULL || d->ipld_dests == NULL || *d->ipld_dests == NULL)
return NULL;
family = fin->fin_family;
@@ -1222,7 +1222,7 @@ ipf_dstlist_select(fin, d)
break;
}
- if (sel->ipfd_dest.fd_addr.adf_family != family)
+ if (sel && sel->ipfd_dest.fd_addr.adf_family != family)
sel = NULL;
d->ipld_selected = sel;
OpenPOWER on IntegriCloud