Fix use-after-free in LocalClient
If the DCB was closed before the handshake for the LocalCliet connection was received, the gw_decode_mysql_server_handshake would use the closed DCB to log the connection ID. Clearing out the pointer prevents it.
This commit is contained in:
@ -32,6 +32,8 @@ LocalClient::LocalClient(MYSQL_session* session, MySQLProtocol* proto, int fd)
|
|||||||
, m_self_destruct(false)
|
, m_self_destruct(false)
|
||||||
{
|
{
|
||||||
MXB_POLL_DATA::handler = LocalClient::poll_handler;
|
MXB_POLL_DATA::handler = LocalClient::poll_handler;
|
||||||
|
m_protocol.owner_dcb = nullptr;
|
||||||
|
m_protocol.stored_query = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalClient::~LocalClient()
|
LocalClient::~LocalClient()
|
||||||
|
|||||||
Reference in New Issue
Block a user