diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-12-29 02:15:09 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-12-29 02:15:09 +0000 |
commit | fd0fc607c10ca0f66a60bf32026cc9f6c9e900be (patch) | |
tree | a24c617a9b81fdeea09ea8f906ccb51b95c82d8e /sys/netinet6 | |
parent | 75da4ee646fa054d0807a1659f7b5607f5bcfe76 (diff) |
add missing null pointer check. from IIJ SEIL team. sync with kame
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_prefix.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet6/in6_prefix.c b/sys/netinet6/in6_prefix.c index 02e0b631f81..c9a23f5ea79 100644 --- a/sys/netinet6/in6_prefix.c +++ b/sys/netinet6/in6_prefix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6_prefix.c,v 1.6 2000/06/07 06:56:30 itojun Exp $ */ +/* $OpenBSD: in6_prefix.c,v 1.7 2000/12/29 02:15:08 itojun Exp $ */ /* $KAME: in6_prefix.c,v 1.29 2000/06/07 05:59:38 itojun Exp $ */ /* @@ -597,14 +597,16 @@ add_each_addr(struct socket *so, struct rr_prefix *rpp, struct rp_addr *rap) if (ia6 != NULL) { if (ia6->ia6_ifpr == NULL) { /* link this addr and the prefix each other */ - IFAFREE(&rap->ra_addr->ia_ifa); + if (rap->ra_addr) + IFAFREE(&rap->ra_addr->ia_ifa); rap->ra_addr = ia6; rap->ra_addr->ia_ifa.ifa_refcnt++; ia6->ia6_ifpr = rp2ifpr(rpp); return; } if (ia6->ia6_ifpr == rp2ifpr(rpp)) { - IFAFREE(&rap->ra_addr->ia_ifa); + if (rap->ra_addr) + IFAFREE(&rap->ra_addr->ia_ifa); rap->ra_addr = ia6; rap->ra_addr->ia_ifa.ifa_refcnt++; return; |