mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-24 06:28:34 +00:00
bgpd: fix crash during configuration removal
Test the BFD config pointer before trying to free the session as it might not exist. Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
parent
a95ba7a7c8
commit
373de4b5b0
@ -326,7 +326,9 @@ static void bgp_peer_remove_bfd(struct peer *p)
|
||||
return;
|
||||
}
|
||||
|
||||
bfd_sess_free(&p->bfd_config->session);
|
||||
if (p->bfd_config)
|
||||
bfd_sess_free(&p->bfd_config->session);
|
||||
|
||||
XFREE(MTYPE_BFD_CONFIG, p->bfd_config);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user