From 9be92438ee489a17dd2511abc2f1ed547d47ff20 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 17 Jan 2018 14:17:15 -0500 Subject: [PATCH] bgpd: Remove peer->hash as that it is unused The peer->hash pointer is allocating a bunch of memory but is never used. Remove. Signed-off-by: Donald Sharp --- bgpd/bgp_advertise.c | 6 ------ bgpd/bgpd.h | 3 --- 2 files changed, 9 deletions(-) diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c index 91a60b72a0..60b82bdf2e 100644 --- a/bgpd/bgp_advertise.c +++ b/bgpd/bgp_advertise.c @@ -245,8 +245,6 @@ void bgp_sync_init(struct peer *peer) BGP_ADV_FIFO_INIT(&sync->withdraw); BGP_ADV_FIFO_INIT(&sync->withdraw_low); peer->sync[afi][safi] = sync; - peer->hash[afi][safi] = - hash_create(baa_hash_key, baa_hash_cmp); } } @@ -261,9 +259,5 @@ void bgp_sync_delete(struct peer *peer) XFREE(MTYPE_BGP_SYNCHRONISE, peer->sync[afi][safi]); peer->sync[afi][safi] = NULL; - - if (peer->hash[afi][safi]) - hash_free(peer->hash[afi][safi]); - peer->hash[afi][safi] = NULL; } } diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 2e7e04c2ed..3cf7d89054 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -804,9 +804,6 @@ struct peer { /* Send prefix count. */ unsigned long scount[AFI_MAX][SAFI_MAX]; - /* Announcement attribute hash. */ - struct hash *hash[AFI_MAX][SAFI_MAX]; - /* Notify data. */ struct bgp_notify notify; -- 2.39.5