]> git.puffer.fish Git - mirror/frr.git/commitdiff
[ospfd] CID #49, fix dereference before NULL check
authorPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 22:50:40 +0000 (22:50 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 22:50:40 +0000 (22:50 +0000)
2006-05-11 Paul Jakma <paul.jakma@sun.com>

* ospf_route.c: (ospf_route_delete_same_ext) Fix deref before
  NULL check by moving into check-protected block, fix CID #49.

ospfd/ChangeLog
ospfd/ospf_route.c

index 6cb83f9a1f6505972b3a438a62d378dca1acbf86..a66cfa0677a226925d010a59746062ca63827967 100644 (file)
@@ -6,6 +6,8 @@
          result, fixes Coverity CID #70.
          (no_ospf_area_filter_list) Check NULL result from
          ospf_area_lookup_by_area_id, fixes Coverity CID #69
+       * ospf_route.c: (ospf_route_delete_same_ext) Fix deref before
+         NULL check by moving into check-protected block, fix CID #49.
 
 2006-04-24 Paul Jakma <paul.jakma@sun.com>
 
index 646b625fc0829733f8286384dbd17dfc2982e40a..e0f2565f971b004302abc8f3d65878b34dc37e3f 100644 (file)
@@ -195,9 +195,9 @@ ospf_route_delete_same_ext(struct route_table *external_routes,
           struct prefix_ipv4 *p = (struct prefix_ipv4 *)(&rn->p);
           if ( (ext_rn = route_node_lookup (external_routes, (struct prefix *)p)) )
             {
-              ospf_zebra_delete (p, ext_rn->info);
               if (ext_rn->info)
                 {
+                  ospf_zebra_delete (p, ext_rn->info);
                   ospf_route_free( ext_rn->info);
                   ext_rn->info = NULL;
                 }