path: root/src
diff options
authorPhilipp Maier <pmaier@sysmocom.de>2017-12-13 15:33:25 +0100
committerHarald Welte <laforge@gnumonks.org>2017-12-13 20:19:52 +0000
commit256d09d1f25e5b519d11b0d28803f2a21419a918 (patch)
tree3a817f9f8ddb2aed20f95ee9c9ac6028279312db /src
parent719322693c2803803326a909a9d3e57564ad7236 (diff)
paging: paging_flush_bts: be sure pending_requests is initalized
The BSSMAP reset causes the paging requests to be flushed. When this happens right after startup then calling paging_flush_bts() may be called when the list bts->paging.pending_requests is not yet initalized, which causes a segfault. Call paging_init_if_needed() to be sure that the list is inizalized (like the other functions also do) Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc
Diffstat (limited to 'src')
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index d657bd306..42ecdcf28 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -477,6 +477,8 @@ void paging_flush_bts(struct gsm_bts *bts, struct bsc_msc_data *msc)
struct gsm_paging_request *req, *req2;
+ paging_init_if_needed(bts);
llist_for_each_entry_safe(req, req2, &bts->paging.pending_requests, entry) {
if (msc && req->msc != msc)