diff mbox

Fix segfault with broken config

Message ID 1460109154-30975-1-git-send-email-msuraev@sysmocom.de
State Not Applicable
Headers show

Commit Message

Max April 8, 2016, 9:52 a.m. UTC
From: Max <msuraev@sysmocom.de>

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

Patch

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)