Browse Source

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.
pull/73/head
Igor Solodovnikov 12 years ago
parent
commit
ee15c1fd5f
  1. 1
      sql-common/client.c

1
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:

Loading…
Cancel
Save