From: Paul Jakma Date: Fri, 12 May 2006 22:51:49 +0000 (+0000) Subject: [ospfd] Fix leak in area-range-cost command, CID #46. X-Git-Tag: frr-2.0-rc1~2714 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=214a4454376e8c96990e4c2ee6edea891c1f3166;p=mirror%2Ffrr.git [ospfd] Fix leak in area-range-cost command, CID #46. 2006-05-11 Paul Jakma * 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. --- diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index a66cfa0677..480e54e35e 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 diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index 8f365da77c..225cf6edbb 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;