Fix use of gw_get_shared_session_auth_info
If the client DCB of the session was passed into the function, it was possible that the session pointer for it was already set to null. The session pointer of an open DCB is never null but a client DCB's session pointer can be null if accessed via the MXS_SESSION object.
This commit is contained in:
@ -1422,7 +1422,7 @@ static int gw_backend_close(DCB* dcb)
|
||||
|| proto->protocol_auth_state == MXS_AUTH_STATE_CONNECTED)
|
||||
{
|
||||
MYSQL_session client;
|
||||
gw_get_shared_session_auth_info(dcb->session->client_dcb, &client);
|
||||
gw_get_shared_session_auth_info(dcb, &client);
|
||||
memset(proto->scramble, 0, sizeof(proto->scramble));
|
||||
dcb_write(dcb, gw_generate_auth_response(&client, proto, false, false, 0));
|
||||
}
|
||||
|
Reference in New Issue
Block a user