From 11ee74bad327e7fb15e8388d20e7838b9e49cadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Sat, 16 Mar 2019 10:24:04 +0200 Subject: [PATCH] Free the readwritesplit query queue If the queue isn't empty when the session closes, the queue would leak. --- server/modules/routing/readwritesplit/readwritesplit.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/server/modules/routing/readwritesplit/readwritesplit.cc b/server/modules/routing/readwritesplit/readwritesplit.cc index 82a37c38a..058efaf88 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.cc +++ b/server/modules/routing/readwritesplit/readwritesplit.cc @@ -918,6 +918,7 @@ static void closeSession(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_sessio { router_cli_ses->rses_closed = true; close_all_connections(router_cli_ses->backends); + gwbuf_free(router_cli_ses->query_queue); if (MXS_LOG_PRIORITY_IS_ENABLED(LOG_INFO) && router_cli_ses->sescmd_list.size())