Skip to content

Commit 180f4c1

Browse files
authored
Merge pull request #9057 from FRRouting/mergify/bp/dev/8.0/pr-9051
bgpd: fix crash during configuration removal (backport #9051)
2 parents 6192157 + 8dd8d00 commit 180f4c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bgpd/bgp_bfd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ static void bgp_peer_remove_bfd(struct peer *p)
326326
return;
327327
}
328328

329-
bfd_sess_free(&p->bfd_config->session);
329+
if (p->bfd_config)
330+
bfd_sess_free(&p->bfd_config->session);
331+
330332
XFREE(MTYPE_BFD_CONFIG, p->bfd_config);
331333
}
332334

0 commit comments

Comments
 (0)