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 ae1f8c5 commit dead635
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 dead635

Please sign in to comment.