diff options
author | Igor Solodovnikov <igor.solodovnikov@oracle.com> | 2013-08-30 20:22:09 +0300 |
---|---|---|
committer | Igor Solodovnikov <igor.solodovnikov@oracle.com> | 2013-08-30 20:22:09 +0300 |
commit | ee15c1fd5fcbbed3293d564c29e672de02b55b65 (patch) | |
tree | 7d3d62f4feb6b1be664fc3a27aec6952c3700ca0 /sql-common | |
parent | 750de994bbef5518602f78fc32854a4f3665ccaa (diff) | |
download | mariadb-git-ee15c1fd5fcbbed3293d564c29e672de02b55b65.tar.gz |
Bug #17297012 MEMORY LEAK IN MYSQL_OPTIONS WHILE CALLING WITH OPTION MYSQL_SET_CLIENT_IP
Memory Leak in mysql_options() was caused by missing call
to my_free() in MYSQL_SET_CLIENT_IP branch. Fixed by adding
my_free() to cleanup mysql->options.client_ip value before
assigning new value.
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 1e98eadda28..16a61d7f53d 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -4151,6 +4151,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) mysql->options.methods_to_use= option; break; case MYSQL_SET_CLIENT_IP: + my_free(mysql->options.client_ip); mysql->options.client_ip= my_strdup(arg, MYF(MY_WME)); break; case MYSQL_SECURE_AUTH: |