[PATCH] e1: Memory leak/Reference leak on the e1inp_line

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

Holger Hans Peter Freyther zecke at selfish.org
Mon Aug 20 13:14:29 UTC 2012


Release the e1inp_line when the signalling link is destroyed. The
e1inp_line was leaked on every OML/RSL disconnect.

The leak occured on the following call path.
e1inp_close_socket
ipaccess_close
e1inp_sign_link_destroy
ipaccess_drop_oml
ipaccess_drop
handle_ts1_read
ipaccess_fd_cb
---
 src/e1_input.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/e1_input.c b/src/e1_input.c
index 957b74c..a85dd91 100644
--- a/src/e1_input.c
+++ b/src/e1_input.c
@@ -486,6 +486,7 @@ void e1inp_sign_link_destroy(struct e1inp_sign_link *link)
 	if (link->ts->line->driver->close)
 		link->ts->line->driver->close(link);
 
+	e1inp_line_put(link->ts->line);
 	talloc_free(link);
 }
 
-- 
1.7.10.4





More information about the OpenBSC mailing list