summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpaul <paul>2006-05-12 22:51:49 +0000
committerpaul <paul>2006-05-12 22:51:49 +0000
commitdd946fdcd5ced05aad0b64c797df0c1ca78320e5 (patch)
tree54edbc213373749684f7a0824d20821e12a3def2
parent74203ebe3582d6d06cb18792d747784349f7a825 (diff)
downloadquagga-dd946fdcd5ced05aad0b64c797df0c1ca78320e5.tar.bz2
quagga-dd946fdcd5ced05aad0b64c797df0c1ca78320e5.tar.xz
[ospfd] Fix leak in area-range-cost command, CID #46.
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.
-rw-r--r--ospfd/ChangeLog3
-rw-r--r--ospfd/ospf_abr.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index a66cfa06..480e54e3 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -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>
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 8f365da7..225cf6ed 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -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;