neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/37074?usp=email )
Change subject: fix stat_item leak in hnb_persistent_free() ......................................................................
fix stat_item leak in hnb_persistent_free()
Add missing stat_item free in hnb_persistent_free().
We recently fixed a rate_ctr leak in I14e050bfb91b993f194e3800eacdc0d10f2b1a4e, but missed the also leaking stat_item.
Particularly relevant with upcoming patch Ic819d7cbc03fb39e98c204b70d016c5170dc6307 -- testing that patch revealed the leak.
Related: osmo-ttcn3-hacks Ibec009203d38f65714561b7c28edbdbd8b34e704 Change-Id: I7326c53d595dce7b442eced89ff8f4b972bd2a82 --- M src/osmo-hnbgw/hnbgw.c 1 file changed, 21 insertions(+), 0 deletions(-)
Approvals: laforge: Looks good to me, approved pespin: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c index 43162fc..8dcf5f2 100644 --- a/src/osmo-hnbgw/hnbgw.c +++ b/src/osmo-hnbgw/hnbgw.c @@ -663,6 +663,7 @@ /* FIXME: check if in use? */ nft_kpi_hnb_stop(hnbp); nft_kpi_hnb_persistent_remove(hnbp); + osmo_stat_item_group_free(hnbp->statg); rate_ctr_group_free(hnbp->ctrs); llist_del(&hnbp->list); hash_del(&hnbp->node_by_id);