diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-01-20 09:38:20 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2021-01-26 10:02:51 +0200 |
commit | 8cdeee177d353e60f4a9cdebe6c851f9505d84b5 (patch) | |
tree | 5004bf762bbd8dab31a4d26739b543a88cee17d9 /sql/wsrep_sst.cc | |
parent | cc2d6d1bb26cdcd649357ec23cd54dd28ddefaf3 (diff) | |
download | mariadb-git-8cdeee177d353e60f4a9cdebe6c851f9505d84b5.tar.gz |
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.
Diffstat (limited to 'sql/wsrep_sst.cc')
-rw-r--r-- | sql/wsrep_sst.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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; |