]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Remove peer->hash as that it is unused
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 17 Jan 2018 19:17:15 +0000 (14:17 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 17 Jan 2018 19:17:15 +0000 (14:17 -0500)
The peer->hash pointer is allocating a bunch of memory
but is never used.  Remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgp_advertise.c
bgpd/bgpd.h

index 840cc35751f0965c7a1f441f898ca377c2d286ad..29b6ca6bfa788fc72fb5baa2053945d27df1da32 100644 (file)
@@ -246,8 +246,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,
-                                                   "BGP Sync Hash");
        }
 }
 
@@ -260,9 +258,5 @@ void bgp_sync_delete(struct peer *peer)
                if (peer->sync[afi][safi])
                        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;
        }
 }
index bf71e79743a0992faf0d3f2cb263542e6e7ce815..c4ac4b0adb05d8e5f0c1cf15b899cc5f38c071d7 100644 (file)
@@ -919,9 +919,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;