[PATCH] Fix segfault with broken config

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