summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-04-08 11:52:34 +0200
committerHarald Welte <laforge@gnumonks.org>2016-04-11 10:22:55 +0200
commit687f048ab04ed135eeb11deb29e6b4cb9727c27d (patch)
tree25637eff9b3fd250fd0c17bf1148d0d27808aa93
parent9bcb1a56cbec710cbfa49ae6623c10595eab08ec (diff)
Fix segfault with broken config
Fixes OS#1691
-rw-r--r--openbsc/src/libbsc/bsc_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 859d9998f..713109c23 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)