From 0975a7f36c41afcb4e477609b97fe890990782ab Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Thu, 17 Dec 2015 09:51:53 +0100 Subject: ns/stats: Add missing osmo_stat_item_group_free to gprs_nsvc_delete The stat item group is not removed by gprs_nsvc_delete which will corrupt the group list. Addresses: valgrind tests/gbproxy/gbproxy_test [...] ==4541== Invalid write of size 4 ==4541== at 0x4071ACA: __llist_add (linuxlist.h:65) ==4541== by 0x4071ACA: llist_add (linuxlist.h:81) ==4541== by 0x4071ACA: osmo_stat_item_group_alloc (stat_item.c:112) ==4541== by 0x407EDFD: gprs_nsvc_create (gprs_ns.c:244) ==4541== by 0x408109D: gprs_ns_instantiate (gprs_ns.c:1388) ==4541== by 0x804CFD3: test_gbproxy_ident_changes (gbproxy_test.c:1501) ==4541== by 0x805FBD3: main (gbproxy_test.c:5803) Sponsored-by: On-Waves ehf --- src/gb/gprs_ns.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c index 061fe589..aa43bb8b 100644 --- a/src/gb/gprs_ns.c +++ b/src/gb/gprs_ns.c @@ -257,6 +257,7 @@ void gprs_nsvc_delete(struct gprs_nsvc *nsvc) osmo_timer_del(&nsvc->timer); llist_del(&nsvc->list); rate_ctr_group_free(nsvc->ctrg); + osmo_stat_item_group_free(nsvc->statg); talloc_free(nsvc); } -- cgit v1.2.3