From 05c2d8a2000e4e74235a171cbdad9c00f7247cd0 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 15 Jun 2023 10:38:49 -0400 Subject: [PATCH] bgpd: Separate out mtype for peer and connection Signed-off-by: Donald Sharp --- bgpd/bgpd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 79f76fb01af1..730c96cdda66 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -80,6 +80,7 @@ #include "bgp_trace.h" DEFINE_MTYPE_STATIC(BGPD, PEER_TX_SHUTDOWN_MSG, "Peer shutdown message (TX)"); +DEFINE_MTYPE_STATIC(BGPD, BGP_PEER_CONNECTION, "BGP Connection information"); DEFINE_QOBJ_TYPE(bgp_master); DEFINE_QOBJ_TYPE(bgp); DEFINE_QOBJ_TYPE(peer); @@ -1142,14 +1143,15 @@ static void bgp_peer_connection_free(struct peer_connection *connection) pthread_mutex_destroy(&connection->io_mtx); memset(connection, 0, sizeof(struct peer_connection)); - XFREE(MTYPE_BGP_PEER, connection); + XFREE(MTYPE_BGP_PEER_CONNECTION, connection); } struct peer_connection *bgp_peer_connection_new(struct peer *peer) { struct peer_connection *connection; - connection = XCALLOC(MTYPE_BGP_PEER, sizeof(struct peer_connection)); + connection = XCALLOC(MTYPE_BGP_PEER_CONNECTION, + sizeof(struct peer_connection)); connection->peer = peer; connection->fd = -1;