[PATCH 2/2] libbsc: Don't free secondary lchan if it is NULL.

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
Wed Aug 10 12:06:36 UTC 2011


From: Daniel Willmann <daniel at totalueberwachung.de>

---
 openbsc/src/libbsc/bsc_api.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index 70d6413..ab71ebb 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -137,7 +137,11 @@ static void assignment_t10_timeout(void *_conn)
 	LOGP(DMSC, LOGL_ERROR, "Assigment T10 timeout on %p\n", conn);
 
 	/* normal release on the secondary channel */
-	lchan_release(conn->secondary_lchan, 0, 1);
+	if (conn->secondary_lchan) {
+		lchan_release(conn->secondary_lchan, 0, 1);
+	} else {
+		LOGP(DMSC, LOGL_NOTICE, "Secondary lchan is NULL, not releasing\n");
+	}
 	conn->secondary_lchan = NULL;
 
 	/* inform them about the failure */
-- 
1.7.2.5





More information about the OpenBSC mailing list