diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2021-07-15 10:58:20 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-15 10:58:20 +0300 |
| commit | 180f4c1d8ba2a993a66391950452a3e22dded15d (patch) | |
| tree | 6e99a17f1ce500d712a82c1c5979456089acc25c | |
| parent | 619215767083b3571e3d27cdb0d0e8d89502ae1b (diff) | |
| parent | 8dd8d002213644d9e662d8bd23b05c57faabb15e (diff) | |
Merge pull request #9057 from FRRouting/mergify/bp/dev/8.0/pr-9051
bgpd: fix crash during configuration removal (backport #9051)
| -rw-r--r-- | bgpd/bgp_bfd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index 6004070e68..d32a5d556e 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -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); } |
