Ensure Async is deinited properly
The global thread local keys were not being deinited properly in async. Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
@@ -351,8 +351,6 @@ int async_init(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: FIXME: This needs to be called by something!!! */
|
|
||||||
void async_deinit(void);
|
|
||||||
void async_deinit(void)
|
void async_deinit(void)
|
||||||
{
|
{
|
||||||
CRYPTO_THREAD_cleanup_local(&ctxkey);
|
CRYPTO_THREAD_cleanup_local(&ctxkey);
|
||||||
|
|||||||
@@ -58,4 +58,5 @@
|
|||||||
#include <openssl/async.h>
|
#include <openssl/async.h>
|
||||||
|
|
||||||
int async_init(void);
|
int async_init(void);
|
||||||
|
void async_deinit(void);
|
||||||
|
|
||||||
|
|||||||
@@ -580,6 +580,16 @@ void OPENSSL_cleanup(void)
|
|||||||
COMP_zlib_cleanup();
|
COMP_zlib_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef OPENSSL_NO_ASYNC
|
||||||
|
if (async_inited) {
|
||||||
|
# ifdef OPENSSL_INIT_DEBUG
|
||||||
|
fprintf(stderr, "OPENSSL_INIT: OPENSSL_cleanup: "
|
||||||
|
"async_deinit()\n");
|
||||||
|
# endif
|
||||||
|
async_deinit();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef OPENSSL_NO_ENGINE
|
#ifndef OPENSSL_NO_ENGINE
|
||||||
if (engine_inited) {
|
if (engine_inited) {
|
||||||
# ifdef OPENSSL_INIT_DEBUG
|
# ifdef OPENSSL_INIT_DEBUG
|
||||||
|
|||||||
Reference in New Issue
Block a user