mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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>
This commit is contained in:
committed by
Jan Lindström
parent
088b37b5ea
commit
d59b16dd96
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user