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:
Massimiliano Pinto
2013-09-10 15:50:47 +02:00
parent 22e9fb9a4d
commit 092795d95b

View File

@ -250,7 +250,7 @@ void* rsession = NULL;
/**
* Terminate router session.
*/
if (dcb->session)
if (dcb->session) {
service = dcb->session->service;
if (service != NULL &&
@ -275,14 +275,16 @@ void* rsession = NULL;
pthread_self());
}
}
/**
* Terminate client session.
*/
if (dcb->session) {
{
SESSION *local_session = dcb->session;
dcb->session = NULL;
session_free(local_session);
}
}
if (dcb->protocol)
free(dcb->protocol);