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 Jun 26, 2023
1 parent 7570eeb commit 72b0723
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bgpd/bgp_bfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 72b0723

Please sign in to comment.