From b56a6bbc55a17d7a31ab65ff334edaaf38d30260 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 27 Dec 2010 16:02:25 +0100 Subject: mncc: bts can be NULL, attempt to find the bts from the transaction Follow trans->conn->lchan to the BTS instead of using the BTS that is guranteed to be NULL in the codepath we have entered here. The trans->conn should still be there, and the lchan should be valid as well as we have reordered the clear statements. --- openbsc/src/gsm_04_08.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index d1789aa52..df24d2f02 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -2921,7 +2921,7 @@ int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg) int i, rc = 0; struct gsm_trans *trans = NULL, *transt; struct gsm_subscriber_connection *conn = NULL; - struct gsm_bts *bts; + struct gsm_bts *bts = NULL; struct gsm_mncc *data = arg, rel; DEBUGP(DMNCC, "receive message %s\n", get_mncc_name(msg_type)); -- cgit v1.2.3