diff options
-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; |