]> git.proxmox.com Git - mirror_frr.git/commitdiff
[zebra] CID #31, guard against potential NULL return of route_node_lookup
authorPaul Jakma <paul.jakma@sun.com>
Thu, 11 May 2006 13:28:05 +0000 (13:28 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Thu, 11 May 2006 13:28:05 +0000 (13:28 +0000)
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.

zebra/ChangeLog
zebra/interface.c

index 06290010c02591c0f710c57b4a173b8ff6aed11a..3df7891fac993783bd5be4fd3c3251c150a9309f 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2006-02-09 Paul Jakma <paul.jakma@sun.com>
 
        * rib.h: (struct {rib,nexthop}) Rearrange fields to avoid
index ce31277fb7d07b7fc93b10a872005c21066e8211..3919c3f11dbf1bc8e013dcdbd786654762edac77 100644 (file)
@@ -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;