bgpd: cancel events once in peer_free()

Don't need to cancel scheduled events twice in a row - just
once.

Signed-off-by: Mark Stapp <mjs@cisco.com>
This commit is contained in:
Mark Stapp 2024-09-18 13:38:00 -04:00
parent aab2946088
commit 05481607a1

View File

@ -1255,7 +1255,6 @@ static void peer_free(struct peer *peer)
EVENT_OFF(peer->t_revalidate_all[afi][safi]); EVENT_OFF(peer->t_revalidate_all[afi][safi]);
assert(!peer->connection->t_write); assert(!peer->connection->t_write);
assert(!peer->connection->t_read); assert(!peer->connection->t_read);
event_cancel_event_ready(bm->master, peer->connection);
/* Free connected nexthop, if present */ /* Free connected nexthop, if present */
if (CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE) if (CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE)