MXS-1709 Fix memory leaks causing test_server to fail

This commit is contained in:
Marko
2018-06-06 09:59:35 +03:00
parent 235bcb4d15
commit 82a95bfe2d
2 changed files with 4 additions and 0 deletions

View File

@ -195,6 +195,8 @@ server_free(SERVER *tofreeserver)
/* Clean up session and free the memory */
MXS_FREE(tofreeserver->protocol);
MXS_FREE(tofreeserver->unique_name);
MXS_FREE(tofreeserver->authenticator);
MXS_FREE(tofreeserver->persistent);
server_parameter_free(tofreeserver->parameters);
if (tofreeserver->persistent)

View File

@ -133,6 +133,8 @@ bool test_load_config(const char *input, SERVER *server)
"Server authenticator options differ");
TEST(server->port == atoi(config_get_param(param, "port")->value), "Server ports differ");
TEST(create_new_server(obj) == 0, "Failed to create server from loaded config");
duplicate_context_finish(&dcontext);
config_context_free(obj);
}
}