Commit 0e25cc51 authored by Brandon Nesterenko's avatar Brandon Nesterenko Committed by Brandon Nesterenko

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.
parent 10fbd1ce
...@@ -159,7 +159,7 @@ int THD::register_slave(uchar *packet, size_t packet_length) ...@@ -159,7 +159,7 @@ int THD::register_slave(uchar *packet, size_t packet_length)
return 0; return 0;
err: err:
delete si; my_free(si);
my_message(ER_UNKNOWN_ERROR, errmsg, MYF(0)); /* purecov: inspected */ my_message(ER_UNKNOWN_ERROR, errmsg, MYF(0)); /* purecov: inspected */
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment