summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorunknown <gluh@eagle.intranet.mysql.r18.ru>2005-11-21 16:09:26 +0400
committerunknown <gluh@eagle.intranet.mysql.r18.ru>2005-11-21 16:09:26 +0400
commit31ea9f945d2acfa8e0dec18df8ae7094d7ca62b0 (patch)
treeb333cc8af1bc5e2584d134438936662fc0e10da2 /sql-common
parent1dfaaba874c5f02222e149466743abb0c268c5d3 (diff)
downloadmariadb-git-31ea9f945d2acfa8e0dec18df8ae7094d7ca62b0.tar.gz
Fix for bug#14780 memory leak for mysql 4.1.14 with openssl enabled
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 3979b9304f7..3a598832253 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1487,11 +1487,15 @@ mysql_ssl_set(MYSQL *mysql __attribute__((unused)) ,
static void
mysql_ssl_free(MYSQL *mysql __attribute__((unused)))
{
+ struct st_VioSSLConnectorFd *st=
+ (struct st_VioSSLConnectorFd*) mysql->connector_fd;
my_free(mysql->options.ssl_key, MYF(MY_ALLOW_ZERO_PTR));
my_free(mysql->options.ssl_cert, MYF(MY_ALLOW_ZERO_PTR));
my_free(mysql->options.ssl_ca, MYF(MY_ALLOW_ZERO_PTR));
my_free(mysql->options.ssl_capath, MYF(MY_ALLOW_ZERO_PTR));
- my_free(mysql->options.ssl_cipher, MYF(MY_ALLOW_ZERO_PTR));
+ my_free(mysql->options.ssl_cipher, MYF(MY_ALLOW_ZERO_PTR));
+ if (st)
+ SSL_CTX_free(st->ssl_context);
my_free(mysql->connector_fd,MYF(MY_ALLOW_ZERO_PTR));
mysql->options.ssl_key = 0;
mysql->options.ssl_cert = 0;