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.
This commit is contained in:
Holger Hans Peter Freyther 2010-12-27 10:57:56 +01:00
parent 8ce8d3a00d
commit 59f787a4c1
1 changed files with 3 additions and 1 deletions

View File

@ -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");