From e92cf867a6befdd3b3240368b72b5454c5d921b1 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Sat, 23 Jul 2022 20:47:27 +0300 Subject: bgpd: Cleanup subgroup hash when we delete/merge a subgroup Signed-off-by: Donatas Abraitis --- bgpd/bgp_updgrp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bgpd/bgp_updgrp.c') diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index 17b3db78a..f43c4ef09 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -115,8 +115,10 @@ static void sync_init(struct update_subgroup *subgrp, static void sync_delete(struct update_subgroup *subgrp) { XFREE(MTYPE_BGP_SYNCHRONISE, subgrp->sync); - if (subgrp->hash) + if (subgrp->hash) { + hash_clean(subgrp->hash, (void (*)(void *))baa_free); hash_free(subgrp->hash); + } subgrp->hash = NULL; if (subgrp->work) stream_free(subgrp->work); -- cgit v1.2.3