[PATCH] Fix segfault with broken config

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

msuraev at sysmocom.de msuraev at sysmocom.de
Fri Apr 8 09:52:34 UTC 2016


From: Max <msuraev at sysmocom.de>

Fixes OS#1691
---
 openbsc/src/libbsc/bsc_init.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 859d999..713109c 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -373,6 +373,9 @@ static int bootstrap_bts(struct gsm_bts *bts)
 {
 	int i, n;
 
+	if (!bts->model)
+		return -EFAULT;
+
 	if (bts->model->start && !bts->model->started) {
 		int ret = bts->model->start(bts->network);
 		if (ret < 0)
-- 
2.8.1




More information about the OpenBSC mailing list