Fix for MXS-968

This commit adds a free() to null_auth_free_client_data, which plugs
the memory leak in maxinfo.

Also, this commit fixes some segfaults when multiple threads are
running status_row() or variable_row(). The functions use
statically allocated index variables, which often go out-of-bounds
in concurrent use. This fix changes the indexes to thread-specific
variables, with allocating and deallocating. This does seem to slow
the functions down somewhat.
This commit is contained in:
ekorh475
2016-11-18 11:30:02 +02:00
parent 5198c3e456
commit de4ea067cf
2 changed files with 37 additions and 18 deletions

View File

@ -150,4 +150,8 @@ null_auth_is_client_ssl_capable(DCB *dcb)
* @param dcb Request handler DCB connected to the client
*/
static void
null_auth_free_client_data(DCB *dcb) {}
null_auth_free_client_data(DCB *dcb)
{
free(dcb->data);
dcb->data = NULL;
}