Affected versions:
All including trunk
Summary:
The memory for the built-in compressions that are loaded in SSL_library_init is
never released.
Cause:
The SSL_library_init calls SSL_COMP_get_compression_method which then calls
load_builtin_compressions to load the built-in compression methods for SSL. No
function is provided to free these compression methods.
Solution:
Add function to manually free the compression methods.
File: ssl_ciph.c
Add function to free the compressions:
void free_compressions(void)
{
if (ssl_comp_methods != NULL)
{
sk_SSL_COMP_free(ssl_comp_methods);
ssl_comp_methods = NULL;
}
}
File: ssl_algs.c
Add function:
void SSL_cleanup(void)
{
#ifndef OPENSSL_NO_COMP
free_compressions();
#endif
}
File: ssl.h
Add definition
void SSL_cleanup(void);
File: .def
Assign ordinal to SSL_cleanup() and add it to the exports
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [email protected]