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:
Markus Mäkelä
2020-07-15 15:35:12 +03:00
parent c4e79f4d3b
commit f2a837e2f1

View File

@ -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
} }
} }