MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:gluh Date:November 21 2005 12:09pm
Subject:bk commit into 4.1 tree (gluh:1.2468) BUG#14780
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of gluh. When gluh does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2468 05/11/21 16:09:26 gluh@stripped +4 -0
  Fix for bug#14780 memory leak for mysql 4.1.14 with openssl enabled

  vio/viossl.c
    1.28 05/11/21 16:08:39 gluh@stripped +0 -19
    Fix for bug#14780 memory leak for mysql 4.1.14 with openssl enabled

  vio/vio_priv.h
    1.5 05/11/21 16:08:39 gluh@stripped +0 -1
    Fix for bug#14780 memory leak for mysql 4.1.14 with openssl enabled

  vio/vio.c
    1.25 05/11/21 16:08:39 gluh@stripped +1 -1
    Fix for bug#14780 memory leak for mysql 4.1.14 with openssl enabled

  sql-common/client.c
    1.88 05/11/21 16:08:39 gluh@stripped +5 -1
    Fix for bug#14780 memory leak for mysql 4.1.14 with openssl enabled

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	gluh
# Host:	eagle.intranet.mysql.r18.ru
# Root:	/home/gluh/MySQL/Merge/4.1

--- 1.87/sql-common/client.c	Wed Sep  7 16:57:04 2005
+++ 1.88/sql-common/client.c	Mon Nov 21 16:08:39 2005
@@ -1487,11 +1487,15 @@
 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;

--- 1.4/vio/vio_priv.h	Wed Sep  7 16:57:06 2005
+++ 1.5/vio/vio_priv.h	Mon Nov 21 16:08:39 2005
@@ -28,7 +28,6 @@
 #ifdef HAVE_OPENSSL
 #include "my_net.h"			/* needed because of struct in_addr */
 
-void	vio_ssl_delete(Vio* vio);
 int	vio_ssl_read(Vio *vio,gptr buf,	int size);
 int	vio_ssl_write(Vio *vio,const gptr buf,int size);
 void	vio_ssl_timeout(Vio *vio, uint which, uint timeout);

--- 1.24/vio/vio.c	Thu Oct 13 21:23:58 2005
+++ 1.25/vio/vio.c	Mon Nov 21 16:08:39 2005
@@ -83,7 +83,7 @@
 #ifdef HAVE_OPENSSL 
   if (type == VIO_TYPE_SSL)
   {
-    vio->viodelete	=vio_ssl_delete;
+    vio->viodelete	=vio_delete;
     vio->vioerrno	=vio_ssl_errno;
     vio->read		=vio_ssl_read;
     vio->write		=vio_ssl_write;

--- 1.27/vio/viossl.c	Wed Sep  7 16:57:07 2005
+++ 1.28/vio/viossl.c	Mon Nov 21 16:08:39 2005
@@ -69,25 +69,6 @@
   DBUG_VOID_RETURN;
 }
 
-/*
-  Delete a vio object
-
-  SYNPOSIS
-    vio_ssl_delete()
-    vio			Vio object.  May be 0.
-*/
-
-
-void vio_ssl_delete(Vio * vio)
-{
-  if (vio)
-  {
-    if (vio->type != VIO_CLOSED)
-      vio_close(vio);
-    my_free((gptr) vio,MYF(0));
-  }
-}
-
 
 int vio_ssl_errno(Vio *vio __attribute__((unused)))
 {
Thread
bk commit into 4.1 tree (gluh:1.2468) BUG#14780gluh21 Nov