summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-01-28 10:36:12 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2019-01-28 10:36:12 +0100
commita3df9bcadc57be70bdadc8cf21290e4fe6c9b37a (patch)
tree630daf21227a6fcd6466f65d70f5809928e2c8b2 /client
parente6fcd7230954c6111bba63e7f7201fc81e50178e (diff)
parentad220b96fb01dbb6acf7e51bdd8d4d6362d96ea7 (diff)
downloadmariadb-git-a3df9bcadc57be70bdadc8cf21290e4fe6c9b37a.tar.gz
Merge branch '5.5' into 10.0
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index d257079138f..77ce8d6dc8a 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -6205,6 +6205,11 @@ void do_connect(struct st_command *command)
if (con_slot == next_con)
next_con++; /* if we used the next_con slot, advance the pointer */
}
+ else // Failed to connect. Free the memory.
+ {
+ mysql_close(con_slot->mysql);
+ con_slot->mysql= NULL;
+ }
dynstr_free(&ds_connection_name);
dynstr_free(&ds_host);