List:Commits« Previous MessageNext Message »
From:msvensson Date:November 7 2006 3:20pm
Subject:bk commit into 5.0 tree (msvensson:1.2290) BUG#23981
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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@stripped, 2006-11-07 15:20:24+01:00, msvensson@neptunus.(none) +1 -0
  Bug#23981 memory leaks from yassl code + other
   - Fix memory leak in vio_VioSSLFD that occurs when one of the calls to SSL_* function
fails. As in the "ssl_des"
     test case where the server is currently not supposed to be able to read the specific
cert/key file.
   - Change error message to be generic as it's called both from server and client code.

  vio/viosslfactories.c@stripped, 2006-11-07 15:20:22+01:00, msvensson@neptunus.(none) +5 -4
    Fix memory leak in vio_VioSSLFD that occurs when one of the calls to SSL_* function
fails. 
    Change error message to be generic as it's called both from server and client code.

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.0-maint

--- 1.27/vio/viosslfactories.c	2006-11-07 15:20:29 +01:00
+++ 1.28/vio/viosslfactories.c	2006-11-07 15:20:29 +01:00
@@ -86,8 +86,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const c
     if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0)
     {
       DBUG_PRINT("error",("unable to get certificate from '%s'\n", cert_file));
-      /* FIX stderr */
-      fprintf(stderr,"Error when connection to server using SSL:");
+      fprintf(stderr,"SSL error: ");
       ERR_print_errors_fp(stderr);
       fprintf(stderr,"Unable to get certificate from '%s'\n", cert_file);
       fflush(stderr);
@@ -100,8 +99,7 @@ vio_set_cert_stuff(SSL_CTX *ctx, const c
     if (SSL_CTX_use_PrivateKey_file(ctx, key_file, SSL_FILETYPE_PEM) <= 0)
     {
       DBUG_PRINT("error", ("unable to get private key from '%s'\n", key_file));
-      /* FIX stderr */
-      fprintf(stderr,"Error when connection to server using SSL:");
+      fprintf(stderr,"SSL error: ");
       ERR_print_errors_fp(stderr);
       fprintf(stderr,"Unable to get private key from '%s'\n", key_file);
       fflush(stderr);
@@ -252,6 +250,7 @@ new_VioSSLFd(const char *key_file, const
   {
     DBUG_PRINT("error", ("failed to set ciphers to use"));
     report_errors();
+    SSL_CTX_free(ssl_fd->ssl_context);
     my_free((void*)ssl_fd,MYF(0));
     DBUG_RETURN(0);
   }
@@ -264,6 +263,7 @@ new_VioSSLFd(const char *key_file, const
     {
       DBUG_PRINT("error", ("SSL_CTX_set_default_verify_paths failed"));
       report_errors();
+      SSL_CTX_free(ssl_fd->ssl_context);
       my_free((void*)ssl_fd,MYF(0));
       DBUG_RETURN(0);
     }
@@ -273,6 +273,7 @@ new_VioSSLFd(const char *key_file, const
   {
     DBUG_PRINT("error", ("vio_set_cert_stuff failed"));
     report_errors();
+    SSL_CTX_free(ssl_fd->ssl_context);
     my_free((void*)ssl_fd,MYF(0));
     DBUG_RETURN(0);
   }
Thread
bk commit into 5.0 tree (msvensson:1.2290) BUG#23981msvensson7 Nov