Commit 4693f01f authored by Eugene Kosov's avatar Eugene Kosov Committed by Vicențiu Ciorbaru

Fix warning discovered by ASAN

Patch submitted by Eugene Kosov <claprix@yandex.ru>,
comments added by commiter.
Signed-off-by: default avatarVicențiu Ciorbaru <vicentiu@mariadb.org>
parent e555540a
......@@ -349,10 +349,13 @@ int print_explain_row(select_result_sink *result,
item_list.push_back(new (mem_root) Item_string_sys(thd, jtype_str),
mem_root);
/* 'possible_keys' */
/* 'possible_keys'
The buffer must not be deallocated before we call send_data, otherwise
we may end up reading freed memory.
*/
StringBuffer<64> possible_keys_buf;
if (possible_keys && !possible_keys->is_empty())
{
StringBuffer<64> possible_keys_buf;
push_string_list(thd, &item_list, *possible_keys, &possible_keys_buf);
}
else
......
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