From a3172c8f9c60eb79f23d2e2ba12f260a69a7097f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 21 Mar 2023 14:29:46 +1100 Subject: [PATCH] Don't check for OPENSSL_cleanup failures by default OPENSSL_cleanup is supposed to free all remaining memory in use provided the application has cleaned up properly. This is not the case on some operating systems. Silently ignore memory that is freed after OPENSSL_cleanup has been called. --- lib/isc/tls.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/isc/tls.c b/lib/isc/tls.c index 0e53775490..d57cf98d1e 100644 --- a/lib/isc/tls.c +++ b/lib/isc/tls.c @@ -77,7 +77,11 @@ isc__tls_set_thread_id(CRYPTO_THREADID *id) { } #endif +#ifdef ISC_TEST_OPENSSL_MEMORY_LEAKS static atomic_bool handle_fatal = false; +#else +static atomic_bool handle_fatal = true; +#endif #if !defined(LIBRESSL_VERSION_NUMBER) /*