diff options
author | Jeevesh Rishi Dindyal (Sarvesh) <68096721+ryndia@users.noreply.github.com> | 2023-05-09 11:59:58 +0200 |
---|---|---|
committer | ryndia <dindyalsarvesh@gmail.com> | 2023-05-10 08:59:20 +0200 |
commit | c824d9792e1c2fd4f531c046a59627ce74a9b115 (patch) | |
tree | 5bb225cee130d7fc2163c64b06ff3831f494c4ad /ospfd/ospf_abr.c | |
parent | Merge pull request #13437 from raja-rajasekar/raja-rajasekar/show_cmd_fix (diff) | |
download | frr-c824d9792e1c2fd4f531c046a59627ce74a9b115.tar.xz frr-c824d9792e1c2fd4f531c046a59627ce74a9b115.zip |
ospfd: opsf_abr.c memory leak fix, free range
The new create range attribute is send to add to ranges, but not use if the prefix already exist in the ranges.
Signed-off-by: ryndia <dindyalsarvesh@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | ospfd/ospf_abr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index ded520889..28d526870 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -66,9 +66,11 @@ static void ospf_area_range_add(struct ospf_area *area, apply_mask_ipv4(&p); rn = route_node_get(ranges, (struct prefix *)&p); - if (rn->info) + if (rn->info) { route_unlock_node(rn); - else + ospf_area_range_free(rn->info); + rn->info = range; + } else rn->info = range; } |