aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-08 23:18:21 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-09 11:53:12 +0200
commit79e2d4230dca5e5c41febe323dacc765adc43b88 (patch)
tree6bc2e5582d521a85c4f09df01263c1211661ee94
parent8ecd029b127f8318221f605332b48b4fba3a353a (diff)
bsc_msc_ip.c: Fix crash when gsmnet is not yet initialized.
-rw-r--r--openbsc/src/bsc_msc_ip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c
index ce37fe590..96afbc5e9 100644
--- a/openbsc/src/bsc_msc_ip.c
+++ b/openbsc/src/bsc_msc_ip.c
@@ -968,8 +968,10 @@ static void signal_handler(int signal)
switch (signal) {
case SIGINT:
- bsc_shutdown_net(bsc_gsmnet);
- sleep(3);
+ if (bsc_gsmnet) {
+ bsc_shutdown_net(bsc_gsmnet);
+ sleep(3);
+ }
exit(0);
break;
case SIGABRT: