diff options
-rw-r--r-- | client/mysql.cc | 7 | ||||
-rw-r--r-- | include/sslopt-case.h | 3 | ||||
-rw-r--r-- | vio/viossl.c | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 21a3b422b25..653f6bc9f44 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -379,6 +379,13 @@ int main(int argc,char *argv[]) sig_handler mysql_end(int sig) { mysql_close(&mysql); +#ifdef HAVE_OPENSSL + my_free(opt_ssl_key,MYF(MY_ALLOW_ZERO_PTR)); + my_free(opt_ssl_cert,MYF(MY_ALLOW_ZERO_PTR)); + my_free(opt_ssl_ca,MYF(MY_ALLOW_ZERO_PTR)); + my_free(opt_ssl_capath,MYF(MY_ALLOW_ZERO_PTR)); + my_free(opt_ssl_cipher,MYF(MY_ALLOW_ZERO_PTR)); +#endif #ifdef HAVE_READLINE if (!status.batch && !quick && !opt_html && !opt_xml) { diff --git a/include/sslopt-case.h b/include/sslopt-case.h index b5720286778..b801e5e73c7 100644 --- a/include/sslopt-case.h +++ b/include/sslopt-case.h @@ -37,12 +37,11 @@ case OPT_SSL_CAPATH: opt_use_ssl = 1; /* true */ my_free(opt_ssl_ca, MYF(MY_ALLOW_ZERO_PTR)); - opt_ssl_ca = my_strdup(optarg, MYF(0)); + opt_ssl_capath = my_strdup(optarg, MYF(0)); break; case OPT_SSL_CIPHER: opt_use_ssl = 1; /* true */ my_free(opt_ssl_cipher, MYF(MY_ALLOW_ZERO_PTR)); opt_ssl_cipher = my_strdup(optarg, MYF(0)); break; - #endif diff --git a/vio/viossl.c b/vio/viossl.c index 19fd6e0f0ab..c87836e56b6 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -292,7 +292,7 @@ void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout) report_errors(); DBUG_VOID_RETURN; } - DBUG_PRINT("info", ("ssl_=%p",vio->ssl_)); + DBUG_PRINT("info", ("ssl_=%p timeout=%ld",vio->ssl_, timeout)); SSL_clear(vio->ssl_); vio_blocking(vio, FALSE); SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout); @@ -348,7 +348,7 @@ void sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* vio, long timeout) report_errors(); DBUG_VOID_RETURN; } - DBUG_PRINT("info",("ssl_=%p",vio->ssl_)); + DBUG_PRINT("info", ("ssl_=%p timeout=%ld",vio->ssl_, timeout)); SSL_clear(vio->ssl_); vio_blocking(vio, FALSE); SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout); |