Fix memory leak in throttlefilter
The filter would leak the buffer when it disconnects a client. This fixes the throttlefilter test if it's run with ASAN or valgrind.
This commit is contained in:
@ -96,6 +96,7 @@ int ThrottleSession::real_routeQuery(GWBUF* buffer, bool is_delayed)
|
|||||||
MXS_NOTICE("Query throttling Session %ld user %s, throttling limit reached. Disconnect.",
|
MXS_NOTICE("Query throttling Session %ld user %s, throttling limit reached. Disconnect.",
|
||||||
m_pSession->ses_id,
|
m_pSession->ses_id,
|
||||||
m_pSession->client_dcb->user);
|
m_pSession->client_dcb->user);
|
||||||
|
gwbuf_free(buffer);
|
||||||
return false; // disconnect
|
return false; // disconnect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user