Set current_dcb to NULL if the current DCB is deleted

This commit is contained in:
Johan Wikman 2017-09-06 13:45:39 +03:00
parent c542010e67
commit 699b3909f7

View File

@ -266,6 +266,12 @@ dcb_final_free(DCB *dcb)
void
dcb_free_all_memory(DCB *dcb)
{
// This needs to be done here because session_free() calls this directly.
if (this_thread.current_dcb == dcb)
{
this_thread.current_dcb = NULL;
}
DCB_CALLBACK *cb_dcb;
if (dcb->protocol)