mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-34397: "delete si" rather than "my_free(si)" in THD::register_slave()
In the error case of THD::register_slave(), there is undefined behavior of Slave_info si because it is allocated via malloc() (my_malloc), and cleaned up via delete(). This patch makes these consistent by switching si's cleanup to use my_free.
This commit is contained in:
parent
10fbd1ce51
commit
0e25cc51a9
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ int THD::register_slave(uchar *packet, size_t packet_length)
|
|||
return 0;
|
||||
|
||||
err:
|
||||
delete si;
|
||||
my_free(si);
|
||||
my_message(ER_UNKNOWN_ERROR, errmsg, MYF(0)); /* purecov: inspected */
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue