SSL and fast_forward : removed double frees

pull/4062/head
René Cannaò 3 years ago
parent 85941b4707
commit c993eda2e4

@ -243,6 +243,15 @@ class MySQL_Data_Stream
statuses.myconnpoll_put++;
myconn->myds=NULL;
myconn=NULL;
if (encrypted == true) {
if (sess != NULL && sess->session_fast_forward == true) {
// it seems we are a connection with SSL on a fast_forward session.
// See attach_connection() for more details .
// We now disable SSL metadata from the Data Stream
encrypted = false;
ssl = NULL;
}
}
}
void return_MySQL_Connection_To_Pool();

@ -385,15 +385,6 @@ MySQL_Data_Stream::~MySQL_Data_Stream() {
SSL_shutdown(ssl);
}
if (ssl) SSL_free(ssl);
/*
SSL_free() should also take care of these
if (rbio_ssl) {
BIO_free(rbio_ssl);
}
if (wbio_ssl) {
BIO_free(wbio_ssl);
}
*/
}
if (multi_pkt.ptr) {
l_free(multi_pkt.size,multi_pkt.ptr);

@ -21,7 +21,7 @@ int main(int argc, char** argv) {
if(cl.getEnv())
return exit_status();
plan(3);
plan(5);
diag("Testing SSL and fast_forward");
MYSQL* mysqladmin = mysql_init(NULL);
@ -154,7 +154,6 @@ int main(int argc, char** argv) {
mysql_free_result(result);
mysql_close(mysql_1);
/*
diag("We now create a connection using SSL for both client or backend");
{
std::vector<std::string> queries = {
@ -184,7 +183,6 @@ int main(int argc, char** argv) {
mysql_free_result(result);
mysql_close(mysql_1);
*/
mysql_close(mysqladmin);

Loading…
Cancel
Save