[PATCH 3/5] gbproxy: Fix rate counter group leak in peer_free()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Jacob Erlbeck jerlbeck at sysmocom.de
Wed Oct 23 09:24:16 UTC 2013


This also frees the counter group pointed to by peer->ctrg when the
peer gets freed.

Sponsored-by: On-Waves ehf
---
 openbsc/src/gprs/gb_proxy.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index d075578..d5872a9 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -206,6 +206,7 @@ static struct gbprox_peer *peer_alloc(uint16_t bvci)
 
 static void peer_free(struct gbprox_peer *peer)
 {
+	rate_ctr_group_free(peer->ctrg);
 	llist_del(&peer->list);
 	talloc_free(peer);
 }
-- 
1.7.9.5





More information about the OpenBSC mailing list