in dcb_final_free the dcb->session NULL check protects the access to dcb->session->router_session and all the code below
This commit is contained in:
@ -250,7 +250,7 @@ void* rsession = NULL;
|
|||||||
/**
|
/**
|
||||||
* Terminate router session.
|
* Terminate router session.
|
||||||
*/
|
*/
|
||||||
if (dcb->session)
|
if (dcb->session) {
|
||||||
service = dcb->session->service;
|
service = dcb->session->service;
|
||||||
|
|
||||||
if (service != NULL &&
|
if (service != NULL &&
|
||||||
@ -275,14 +275,16 @@ void* rsession = NULL;
|
|||||||
pthread_self());
|
pthread_self());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Terminate client session.
|
* Terminate client session.
|
||||||
*/
|
*/
|
||||||
if (dcb->session) {
|
{
|
||||||
SESSION *local_session = dcb->session;
|
SESSION *local_session = dcb->session;
|
||||||
dcb->session = NULL;
|
dcb->session = NULL;
|
||||||
session_free(local_session);
|
session_free(local_session);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dcb->protocol)
|
if (dcb->protocol)
|
||||||
free(dcb->protocol);
|
free(dcb->protocol);
|
||||||
|
Reference in New Issue
Block a user