mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 01:40:16 +00:00
pimd: Prevent memory leak
When we decide that we do not need a item on the partial_bsrp_list don't just drop the memory on the floor, free it up. This was happening when we decided that a pending item has a hold time of 0. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
1523c0f9ee
commit
5f1808acab
@ -419,9 +419,12 @@ static void pim_instate_pend_list(struct bsgrp_node *bsgrp_node)
|
|||||||
active = bsm_rpinfos_first(bsgrp_node->bsrp_list);
|
active = bsm_rpinfos_first(bsgrp_node->bsrp_list);
|
||||||
|
|
||||||
/* Remove nodes with hold time 0 & check if list still has a head */
|
/* Remove nodes with hold time 0 & check if list still has a head */
|
||||||
frr_each_safe (bsm_rpinfos, bsgrp_node->partial_bsrp_list, pend)
|
frr_each_safe (bsm_rpinfos, bsgrp_node->partial_bsrp_list, pend) {
|
||||||
if (is_hold_time_zero(pend))
|
if (is_hold_time_zero(pend)) {
|
||||||
bsm_rpinfos_del(bsgrp_node->partial_bsrp_list, pend);
|
bsm_rpinfos_del(bsgrp_node->partial_bsrp_list, pend);
|
||||||
|
pim_bsm_rpinfo_free(pend);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pend = bsm_rpinfos_first(bsgrp_node->partial_bsrp_list);
|
pend = bsm_rpinfos_first(bsgrp_node->partial_bsrp_list);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user