mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 18:44:54 +00:00
pimd: Avoid reading freed memory.
If the upstream is freed in pim_upstream_del, then trying to call pim_upstream_timers_stop will lead to accessing freed memory. Fix: Stop the timer only if upstream is not deleted. Co-authored-by: Sarita Patra <saritap@vmware.com> Co-authored-by: Mobashshera Rasool <mrasool@vmware.com> Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
This commit is contained in:
parent
8a8fd10a47
commit
30247bd637
@ -1948,7 +1948,7 @@ void pim_upstream_terminate(struct pim_instance *pim)
|
||||
struct pim_upstream *up;
|
||||
|
||||
while ((up = rb_pim_upstream_first(&pim->upstream_head))) {
|
||||
pim_upstream_del(pim, up, __func__);
|
||||
if (pim_upstream_del(pim, up, __func__))
|
||||
pim_upstream_timers_stop(up);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user