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:
parent
8ce8d3a00d
commit
59f787a4c1
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue