summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
authorPaul Jakma <paul.jakma@sun.com>2006-05-11 13:28:05 +0000
committerPaul Jakma <paul.jakma@sun.com>2006-05-11 13:28:05 +0000
commitbeb5633607919d10ba8852ad51fe0b1dc7ecc812 (patch)
treecf63d68186ec7e2b594e6fa6f95ad6f8aa7b7338 /zebra/interface.c
parent995b96515b7075fec77ab51dfe8be7788abd838d (diff)
[zebra] CID #31, guard against potential NULL return of route_node_lookup
2006-05-11 Paul Jakma <paul.jakma@sun.com> * interface.c: (if_delete_update) route_node_lookup may return NULL, should fix Coverity CID #31.
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index ce31277f..3919c3f1 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;