Merge pull request #13479 from ryndia/fix_leak

[WIP] ospfd: opsf_abr.c memory leak fix, free unused range
This commit is contained in:
Donald Sharp 2023-05-10 08:53:23 -04:00 committed by GitHub
commit c64bac8943
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}