Cloned DCB authentication data was freed twice
This caused all Tee filter sessions to crash when the branch DCB was closed.
This commit is contained in:
parent
f77afc6374
commit
f03865f32a
@ -369,7 +369,15 @@ dcb_final_free(DCB *dcb)
|
||||
if (SESSION_STATE_DUMMY != local_session->state)
|
||||
{
|
||||
session_free(local_session);
|
||||
return;
|
||||
|
||||
if (local_session->client_dcb == dcb)
|
||||
{
|
||||
/** The client DCB is freed once all other DCBs that the session
|
||||
* uses have been freed. This will guarantee that the authentication
|
||||
* data will be usable for all DCBs even if the client DCB has already
|
||||
* been closed. */
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
dcb_free_all_memory(dcb);
|
||||
|
@ -427,7 +427,10 @@ session_free(SESSION *session)
|
||||
*/
|
||||
if (session->client_dcb)
|
||||
{
|
||||
mysql_auth_free_client_data(session->client_dcb);
|
||||
if (!DCB_IS_CLONE(session->client_dcb))
|
||||
{
|
||||
mysql_auth_free_client_data(session->client_dcb);
|
||||
}
|
||||
dcb_free_all_memory(session->client_dcb);
|
||||
}
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user