Skip to content

Commit

Permalink
bgp: Using variable after free
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoMNardi committed Jan 17, 2024
1 parent 5eb2dda commit ae1f8c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bgpd/bgp_bfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,10 @@ static void bgp_peer_remove_bfd(struct peer *p)
return;
}

if (p->bfd_config)
bfd_sess_free(&p->bfd_config->session);
if (p->bfd_config) {
bfd_sess_free(&p->bfd_config->session);
p->bfd_config->manual = false;
}

XFREE(MTYPE_BFD_CONFIG, p->bfd_config);
}
Expand Down

0 comments on commit ae1f8c5

Please sign in to comment.