summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
authorDaniele Sciascia <daniele.sciascia@galeracluster.com>2022-03-29 14:58:19 +0200
committerJan Lindström <jan.lindstrom@mariadb.com>2022-03-30 08:31:18 +0300
commitd59b16dd9605d7caecb454fb9efdaa4dfc5770cc (patch)
tree72dfb4e69831b84647885ee08fea231ea8d6fe38 /client/mysqltest.cc
parent088b37b5eaa8c3198c7f8ea0358d15135833f6bb (diff)
downloadmariadb-git-d59b16dd9605d7caecb454fb9efdaa4dfc5770cc.tar.gz
Galera test failure on galera_bf_abort_ps_bind
Fix a possible crash on my_free() due to the use of strdup() versus my_strdup(), and a memory leak. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 814c07ba60f..0f910d00927 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -8535,7 +8535,10 @@ void run_prepare_stmt(struct st_connection *cn, struct st_command *command, cons
separate string
*/
if (!disable_warnings)
+ {
append_warnings(&ds_prepare_warnings, mysql);
+ dynstr_free(&ds_prepare_warnings);
+ }
end:
DBUG_VOID_RETURN;
}
@@ -8611,7 +8614,7 @@ void run_bind_stmt(struct st_connection *cn, struct st_command *command,
else
{
ps_params[i].buffer_type= MYSQL_TYPE_STRING;
- ps_params[i].buffer= strdup(p);
+ ps_params[i].buffer= my_strdup(p, MYF(MY_WME));
ps_params[i].buffer_length= (unsigned long)strlen(p);
}
}