diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-03-19 23:23:51 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-03-23 00:55:19 +0100 |
commit | 7e300424a39f8b99ef73e037861f454268ba6fe7 (patch) | |
tree | f668e7822158c5a6bc8d642469ef843251e5717e /sql | |
parent | ccd5c9c64e17f33bec73f8dbee8f17cbc8a8f09d (diff) | |
download | mariadb-git-7e300424a39f8b99ef73e037861f454268ba6fe7.tar.gz |
wsrep_sst_auth: fix a memory leak
wsrep_sst_auth_init() is always invoked with value==wsrep_sst_auth.
Old code was leaking value, because it was never freed.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/wsrep_sst.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc index 94804a6d3c7..8db100f3dc1 100644 --- a/sql/wsrep_sst.cc +++ b/sql/wsrep_sst.cc @@ -182,8 +182,8 @@ bool wsrep_sst_auth_update (sys_var *self, THD* thd, enum_var_type type) void wsrep_sst_auth_init (const char* value) { - if (wsrep_sst_auth == value) wsrep_sst_auth = NULL; - if (value) sst_auth_real_set (value); + DBUG_ASSERT(wsrep_sst_auth == value); + sst_auth_real_set (wsrep_sst_auth); } bool wsrep_sst_donor_check (sys_var *self, THD* thd, set_var* var) |