mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Fix valgrind error - memory leak in yassl's SSL_remove_state
This commit is contained in:
parent
6950f83d5e
commit
e6921f28c1
3 changed files with 8 additions and 1 deletions
|
@ -342,6 +342,7 @@ private:
|
|||
Sessions& GetSessions(); // forward singletons
|
||||
sslFactory& GetSSL_Factory();
|
||||
Errors& GetErrors();
|
||||
bool HasErrors();
|
||||
|
||||
|
||||
// openSSL method and context types
|
||||
|
|
|
@ -1493,7 +1493,8 @@ int SSLeay_add_ssl_algorithms() // compatibility only
|
|||
|
||||
void ERR_remove_state(unsigned long)
|
||||
{
|
||||
GetErrors().Remove();
|
||||
if (HasErrors())
|
||||
GetErrors().Remove();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1688,6 +1688,11 @@ Errors& GetErrors()
|
|||
return *errorsInstance;
|
||||
}
|
||||
|
||||
bool HasErrors()
|
||||
{
|
||||
return (errorsInstance != 0);
|
||||
}
|
||||
|
||||
|
||||
typedef Mutex::Lock Lock;
|
||||
|
||||
|
|
Loading…
Reference in a new issue