[MERGED] openbsc[master]: RBS2000: Avoid segfault if ts->lapd instance doesn't exist

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/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Nov 13 19:57:52 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: RBS2000: Avoid segfault if ts->lapd instance doesn't exist
......................................................................


RBS2000: Avoid segfault if ts->lapd instance doesn't exist

This happens e.g. with DAHDI driver, when the DAHDI device cannot be
opened.  Let's not prematurely seg-fault early in the RBS2000 signal
handler, but take the proper error handlign for this.

Change-Id: I9223fb1568d3db7e278f07240c4be334c6602a13
---
M openbsc/src/libbsc/bts_ericsson_rbs2000.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/libbsc/bts_ericsson_rbs2000.c b/openbsc/src/libbsc/bts_ericsson_rbs2000.c
index 1300b4a..faf6f05 100644
--- a/openbsc/src/libbsc/bts_ericsson_rbs2000.c
+++ b/openbsc/src/libbsc/bts_ericsson_rbs2000.c
@@ -71,6 +71,8 @@
 			continue;
 
 		llist_for_each_entry(link, &ts->sign.sign_links, list) {
+			if (!ts->lapd)
+				continue;
 			lapd_instance_set_profile(ts->lapd,
 						  &lapd_profile_abis_ericsson);
 

-- 
To view, visit https://gerrit.osmocom.org/1238
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9223fb1568d3db7e278f07240c4be334c6602a13
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list