aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/ipfilter/netinet
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2014-09-22 16:45:28 +0000
committerCy Schubert <cy@FreeBSD.org>2014-09-22 16:45:28 +0000
commit11eb83e63874466355e4b38eddf423bc47c1d824 (patch)
tree813a11113e257f2edb44cb67f9cb3865bcac13ac /sys/contrib/ipfilter/netinet
parent66829acbb34cf3d0901aeb4eadb2f2ec53a5a673 (diff)
downloadsrc-11eb83e63874466355e4b38eddf423bc47c1d824.tar.gz
src-11eb83e63874466355e4b38eddf423bc47c1d824.zip
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-> Approved by: glebius (mentor) Obtained from: NetBSD CVS repo (r1.5)
Notes
Notes: svn path=/head/; revision=271980
Diffstat (limited to 'sys/contrib/ipfilter/netinet')
-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 ce2e72e8130f..d516556c39cc 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;