[PATCH libosmo-netif 16/18] tests: osmux: fix msgb leaks

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/.

pablo at gnumonks.org pablo at gnumonks.org
Tue Jul 21 14:23:31 UTC 2015


From: Pablo Neira Ayuso <pablo at soleta.eu>

---
 tests/osmux/osmux_test.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/osmux/osmux_test.c b/tests/osmux/osmux_test.c
index 7cc838d..9ceabcd 100644
--- a/tests/osmux/osmux_test.c
+++ b/tests/osmux/osmux_test.c
@@ -78,6 +78,7 @@ static void tx_cb(struct msgb *msg, void *data)
 	}
 
 	rtp_pkts--;
+	msgb_free(msg);
 }
 
 static struct osmux_out_handle h_output;
@@ -98,6 +99,7 @@ static void osmux_deliver(struct msgb *batch_msg, void *data)
 		osmux_xfrm_output(osmuxh, &h_output, &list);
 		osmux_tx_sched(&list, tx_cb, NULL);
 	}
+	msgb_free(batch_msg);
 }
 
 struct osmux_in_handle h_input = {
-- 
1.7.10.4




More information about the OpenBSC mailing list