summaryrefslogtreecommitdiff
path: root/proto/bgp/attrs.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r--proto/bgp/attrs.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index 882ba44e..dea3c4a6 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -64,8 +64,6 @@
* format - Optional hook that converts eattr to textual representation.
*/
-// XXXX review pool usage : c->c.proto->pool
-
struct bgp_attr_desc {
const char *name;
@@ -1175,6 +1173,22 @@ bgp_init_bucket_table(struct bgp_channel *c)
c->withdraw_bucket = NULL;
}
+void
+bgp_free_bucket_table(struct bgp_channel *c)
+{
+ HASH_FREE(c->bucket_hash);
+
+ struct bgp_bucket *b;
+ WALK_LIST_FIRST(b, c->bucket_queue)
+ {
+ rem_node(&b->send_node);
+ mb_free(b);
+ }
+
+ mb_free(c->withdraw_bucket);
+ c->withdraw_bucket = NULL;
+}
+
static struct bgp_bucket *
bgp_get_bucket(struct bgp_channel *c, ea_list *new)
{