From 8cdeee177d353e60f4a9cdebe6c851f9505d84b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 20 Jan 2021 09:38:20 +0200 Subject: MDEV-24509 : Warning: Memory not freed: 56 on SET @@global.wsrep_sst_auth It seems that memory is not freed when updated value is NULL or when wsrep is not initialized before shutdown. --- sql/wsrep_sst.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sql/wsrep_sst.cc') diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 65a3f971c62..e12a26efbb6 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -149,6 +149,12 @@ static bool sst_auth_real_set (const char* value) if (wsrep_sst_auth) { my_free((void*) wsrep_sst_auth); } wsrep_sst_auth= my_strdup(WSREP_SST_AUTH_MASK, MYF(0)); } + else + { + if (wsrep_sst_auth) { my_free((void*) wsrep_sst_auth); } + wsrep_sst_auth= NULL; + } + return 0; } return 1; -- cgit v1.2.1