aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-12-20 09:48:28 +0100
committerHarald Welte <laforge@netfilter.org>2009-12-20 13:20:54 +0100
commit0b7b61c6b79eb2e69a9418af611e67bdbc70b353 (patch)
treebdf347d8440c86d23e99426092b3c46ba8c7e514
parent5e68183a201ab92f29cd2467df5209f7b351a66d (diff)
fix segfault in rrlp code in case of unsuccessful paging
PAGING_COMPLETED can be signalled without an active lchan in case it was unable to page the repsective subscriber.
-rw-r--r--openbsc/src/rrlp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/src/rrlp.c b/openbsc/src/rrlp.c
index 60ce750a..d4665d57 100644
--- a/openbsc/src/rrlp.c
+++ b/openbsc/src/rrlp.c
@@ -90,6 +90,10 @@ static int paging_sig_cb(unsigned int subsys, unsigned int signal,
switch (signal) {
case S_PAGING_COMPLETED:
+ /* paging might have "completed' unsucessfully,
+ * in this case we don't have a lchan */
+ if (!psig_data->lchan)
+ break;
/* A subscriber has attached. */
send_rrlp_req(psig_data->lchan);
break;