Fix crash when multiple MySQL monitors monitor same servers

The monitors always freed and reallocated the memory for the slaves. It
was always of the same size so a static array of that size should also
work.
This commit is contained in:
Markus Makela
2016-09-08 09:46:46 +03:00
parent 4940e1482f
commit a474dad753
4 changed files with 7 additions and 12 deletions

View File

@ -81,7 +81,6 @@ server_alloc(char *servname, char *protocol, unsigned short port)
server->rlag = -2;
server->master_id = -1;
server->depth = -1;
server->slaves = NULL;
server->parameters = NULL;
server->server_string = NULL;
spinlock_init(&server->lock);