]> git.puffer.fish Git - mirror/frr.git/commitdiff
[ospfd] Fix leak in area-range-cost command, CID #46.
authorPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 22:51:49 +0000 (22:51 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 22:51:49 +0000 (22:51 +0000)
2006-05-11 Paul Jakma <paul.jakma@sun.com>

* ospf_abr.c: (ospf_area_range_cost_set) Shouldn't create a new
  range, should just lookup to see if one exists, the new range
  is just leaked. Fixes CID #46.

ospfd/ChangeLog
ospfd/ospf_abr.c

index a66cfa0677a226925d010a59746062ca63827967..480e54e35ebf0424c970b7fc8e7c1e28c22f76a6 100644 (file)
@@ -8,6 +8,9 @@
          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.
+       * ospf_abr.c: (ospf_area_range_cost_set) Shouldn't create a new
+         range, should just lookup to see if one exists, the new range
+         is just leaked. Fixes CID #46.
 
 2006-04-24 Paul Jakma <paul.jakma@sun.com>
 
index 8f365da77cfdd810a65f0e7b0fd0f720955b40f3..225cf6edbb38a6d517cb7799adbd9a1c889377e1 100644 (file)
@@ -244,7 +244,7 @@ ospf_area_range_cost_set (struct ospf *ospf, struct in_addr area_id,
   if (area == NULL)
     return 0;
 
-  range = ospf_area_range_new (p);
+  range = ospf_area_range_lookup (area, p);
   if (range == NULL)
     return 0;