Connection option MYSQL_SERVER_PUBLIC_KEY memory leak
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
Medium
|
Laurynas Biveinis | |||
5.7 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
main.plugin_
Test ended at 2016-07-18 10:35:37
CURRENT_TEST: main.plugin_
Warning: Using a password on the command line interface can be insecure.
Warning: Using a password on the command line interface can be insecure.
Warning: Using a password on the command line interface can be insecure.
=======
==29446==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 131 byte(s) in 1 object(s) allocated from:
#0 0x7fc6e777e54a in malloc (/usr/lib/
#1 0x4789ce in my_malloc /mnt/workspace/
#2 0x479236 in my_strdup /mnt/workspace/
#3 0x44162a in mysql_options /mnt/workspace/
#4 0x40d706 in sql_real_connect /mnt/workspace/
#5 0x40d706 in sql_connect /mnt/workspace/
#6 0x416e64 in main /mnt/workspace/
#7 0x7fc6e5b5782f in __libc_start_main (/lib/x86_
SUMMARY: AddressSanitizer: 131 byte(s) leaked in 1 allocation(s).
mysqltest: At line 10: command "$MYSQL -ukristofer -psecret --default_
The fix is to backport
commit 9979e3e4e63d2c1 bd64e931318afb1 553c38c10c
Author: Rafal Somla <email address hidden>
Date: Mon Mar 10 18:45:27 2014 +0100
Bug#17933308 - VALGRIND: MEMORY LEAK IN MYSQL_OPTIONS() AND MYSQL_LOAD_ PLUGIN_ V()
Two leaks fixed:
1. Freeing memory allocated for
mysql-> options. extension- >server_ public_ key_path inside
mysql_close_ free_options( ) function.
2. Freeing memory allocated inside a dummy MYSQL connection handle used plugin_ init() by calling mysql_close_free() at the
by mysql_client_
end of the function.
Functions mysql_close_free() and mysql_close_ free_options( ) are made available outside the sql-common/client.c file. Also, mysql_close_free() is updated to free memory used by mysql->extension.