Skip to content

Commit

Permalink
Merge pull request #4801 from sysown/v2.7-fix_aux_threads_ssl_leaks
Browse files Browse the repository at this point in the history
Fix leak of `SSL` caches for auxiliary threads
  • Loading branch information
renecannao authored Jan 24, 2025
2 parents a686014 + 0da2f6e commit f8d0542
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/MySQL_Monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class ConsumerThread : public Thread {
m_queue.add(item);
}
// this is intentional to EXIT immediately
return NULL;
goto cleanup;
}


Expand All @@ -109,6 +109,9 @@ class ConsumerThread : public Thread {
delete item->data;
delete item;
}
cleanup:
// De-initializes per-thread structures. Required in all auxiliary threads using MySQL and SSL.
mysql_thread_end();
return NULL;
}
};
Expand Down
2 changes: 2 additions & 0 deletions lib/MySQL_Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ void* kill_query_thread(void *arg) {
delete ssl_params;
ssl_params = NULL;
}
// De-initializes per-thread structures. Required in all auxiliary threads using MySQL and SSL.
mysql_thread_end();
return NULL;
}

Expand Down

0 comments on commit f8d0542

Please sign in to comment.