bsc: Initialize the subscr to NULL in the default case

The paging response should always have a TMSI or IMSI
and we should be able to find the subscriber using that. If
no IMSI/TMSI is present and we would still accept the LU
we would access the uninitialized memory.
This commit is contained in:
Holger Hans Peter Freyther 2011-01-16 18:18:56 +01:00
parent b549ddfb04
commit 3fbd244187
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ static int handle_page_resp(struct gsm_subscriber_connection *conn, struct msgb
case GSM_MI_TYPE_IMSI:
subscr = subscr_active_by_imsi(conn->bts->network, mi_string);
break;
default:
subscr = NULL;
break;
}
if (!subscr) {