aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gsm_04_08.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-27 10:57:56 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-12-27 10:58:55 +0100
commit59f787a4c1ed23883eb31bf96d5b5229b3214b6a (patch)
tree79add004ee43ef890d1365d5ceb53c7183f761a5 /openbsc/src/gsm_04_08.c
parent8ce8d3a00d627b900f9343ffc3d07db0eeeee941 (diff)
auth: Release the security operation after we sent out a message
The release might release the lchan we want to send the response on. Reorder the code to first send the message and then give up the security operation which might release the lchan.
Diffstat (limited to 'openbsc/src/gsm_04_08.c')
-rw-r--r--openbsc/src/gsm_04_08.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c
index 92da6ccef..d6d9b983d 100644
--- a/openbsc/src/gsm_04_08.c
+++ b/openbsc/src/gsm_04_08.c
@@ -927,6 +927,7 @@ static int gsm48_rx_mm_auth_resp(struct gsm_subscriber_connection *conn, struct
/* Validate SRES */
if (memcmp(conn->sec_operation->atuple.sres, ar->sres,4)) {
+ int rc;
gsm_cbfn *cb = conn->sec_operation->cb;
DEBUGPC(DMM, "Invalid (expected %s)\n",
@@ -936,8 +937,9 @@ static int gsm48_rx_mm_auth_resp(struct gsm_subscriber_connection *conn, struct
cb(GSM_HOOK_RR_SECURITY, GSM_SECURITY_AUTH_FAILED,
NULL, conn, conn->sec_operation->cb_data);
+ rc = gsm48_tx_mm_auth_rej(conn);
release_security_operation(conn);
- return gsm48_tx_mm_auth_rej(conn);
+ return rc;
}
DEBUGPC(DMM, "OK\n");