diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-10 00:55:34 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-10 00:55:34 +0100 |
commit | 7fc55925beb06059759294e0e9b7bae45465395f (patch) | |
tree | 9f1ee1b354094aab25f64892f0f5dd1afeafdd26 /proto/bgp/attrs.c | |
parent | ed1d853e5147376086e25f5edae9804cf242d6e0 (diff) |
Several minor fixes
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r-- | proto/bgp/attrs.c | 18 |
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) { |