From e3efb6ee225dd017f99051bfc7d325c8be1f8848 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 9 Dec 2000 14:28:51 -0700 Subject: fixed up leaks found by --exit-info=256 better error diagnostic in SLAVE START sql/mini_client.cc: if we fail to connect, we need to free the inited structure sql/mysqld.cc: added end_slave() for slave cleanup sql/slave.cc: fixed serveral memory leaks sql/slave.h: added end_master_info() for clean up sql/sql_class.cc: not changed sql/sql_repl.cc: initialize master info before creating slave thread in SLAVE START - this way we can easily send an error to the client if something is wrong in init_master_info --- sql/mini_client.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sql/mini_client.cc') diff --git a/sql/mini_client.cc b/sql/mini_client.cc index 3520062e052..11b0b111ec4 100644 --- a/sql/mini_client.cc +++ b/sql/mini_client.cc @@ -386,7 +386,10 @@ my_bool STDCALL mc_mysql_reconnect(MYSQL *mysql) if (!mc_mysql_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd, mysql->db, mysql->port, mysql->unix_socket, mysql->client_flag)) - DBUG_RETURN(1); + { + mc_mysql_close(&tmp_mysql); + DBUG_RETURN(1); + } tmp_mysql.free_me=mysql->free_me; mysql->free_me=0; bzero((char*) &mysql->options,sizeof(&mysql->options)); -- cgit v1.2.1