Skip to content

Commit e428b37

Browse files
Manuel Ungfacebook-github-bot
authored andcommitted
Fix leak in run_plugin_auth_nonblocking
Summary: This fixes this leak: ``` Direct leak of 74 byte(s) in 2 object(s) allocated from: #0 0x9f235f in malloc #1 0xd88f47 in my_raw_malloc(unsigned long, int) #2 0xd88e1e in my_malloc(unsigned int, unsigned long, int) #3 0xc183e4 in read_ok_ex #4 0xc479d5 in authsm_handle_second_authenticate_user(mysql_async_auth*) #5 0xc32a97 in run_plugin_auth_nonblocking(MYSQL*, char*, unsigned int, char const*, char const*, char const*, char const*, bool) #6 0xc3329a in run_plugin_auth_nonblocking_wrapper #7 0xbfd0de in mysql_change_user_nonblocking #8 0xb7f162 in async_mysql_change_user_wrapper(MYSQL*, char const*, char const*, char const*) #9 0xb7eff1 in mysql_change_user_wrapper(MYSQL*, char const*, char const*, char const*) #10 0xb63882 in do_change_user(st_command*) #11 0xb5ad99 in main #12 0x7fbe8362c656 in __libc_start_call_main #13 0x7fbe8362c717 in __libc_start_main_impl #14 0x94b160 in _start ``` Squash with: D29434855 Reviewed By: jupyung Differential Revision: D43006844 fbshipit-source-id: 254272b
1 parent 392f9b9 commit e428b37

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sql-common/client.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5951,6 +5951,7 @@ mysql_state_machine_status run_plugin_auth_nonblocking(
59515951
my_free(ctx->saved_db);
59525952

59535953
// alloc new connect information
5954+
my_free(mysql->db);
59545955
mysql->db = db ? my_strdup(PSI_NOT_INSTRUMENTED, db, MYF(MY_WME)) : 0;
59555956
} else { // STATE_MACHINE_FAILED
59565957
// free temporary connect information

0 commit comments

Comments
 (0)