From dead6352abe26643cfbfaddf03ed6c6ca7a48e22 Mon Sep 17 00:00:00 2001 From: Rodrigo Nardi Date: Mon, 26 Jun 2023 07:26:23 -0300 Subject: [PATCH] bgp: Using variable after free --- bgpd/bgp_bfd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c index dcc707452a..85d4035a17 100644 --- a/bgpd/bgp_bfd.c +++ b/bgpd/bgp_bfd.c @@ -320,10 +320,8 @@ static void bgp_peer_remove_bfd(struct peer *p) return; } - if (p->bfd_config) { + if (p->bfd_config) bfd_sess_free(&p->bfd_config->session); - p->bfd_config->manual = false; - } XFREE(MTYPE_BFD_CONFIG, p->bfd_config); }