Commit e6921f28 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix valgrind error - memory leak in yassl's SSL_remove_state

parent 6950f83d
......@@ -342,6 +342,7 @@ private:
Sessions& GetSessions(); // forward singletons
sslFactory& GetSSL_Factory();
Errors& GetErrors();
bool HasErrors();
// openSSL method and context types
......
......@@ -1493,6 +1493,7 @@ int SSLeay_add_ssl_algorithms() // compatibility only
void ERR_remove_state(unsigned long)
{
if (HasErrors())
GetErrors().Remove();
}
......
......@@ -1688,6 +1688,11 @@ Errors& GetErrors()
return *errorsInstance;
}
bool HasErrors()
{
return (errorsInstance != 0);
}
typedef Mutex::Lock Lock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment