From: Paul Jakma Date: Thu, 11 May 2006 13:28:05 +0000 (+0000) Subject: [zebra] CID #31, guard against potential NULL return of route_node_lookup X-Git-Tag: frr-2.0-rc1~2718 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=beb5633607919d10ba8852ad51fe0b1dc7ecc812;p=mirror%2Ffrr.git [zebra] CID #31, guard against potential NULL return of route_node_lookup 2006-05-11 Paul Jakma * interface.c: (if_delete_update) route_node_lookup may return NULL, should fix Coverity CID #31. --- diff --git a/zebra/ChangeLog b/zebra/ChangeLog index 06290010c0..3df7891fac 100644 --- a/zebra/ChangeLog +++ b/zebra/ChangeLog @@ -1,3 +1,8 @@ +2006-05-11 Paul Jakma + + * interface.c: (if_delete_update) route_node_lookup may return + NULL, should fix Coverity CID #31. + 2006-02-09 Paul Jakma * rib.h: (struct {rib,nexthop}) Rearrange fields to avoid diff --git a/zebra/interface.c b/zebra/interface.c index ce31277fb7..3919c3f11d 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -407,9 +407,9 @@ if_delete_update (struct interface *ifp) ifc = listgetdata (node); p = ifc->address; - if (p->family == AF_INET) + if (p->family == AF_INET + && (rn = route_node_lookup (zebra_if->ipv4_subnets, p))) { - rn = route_node_lookup (zebra_if->ipv4_subnets, p); route_unlock_node (rn); addr_list = (struct list *) rn->info;