]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Don't check for OPENSSL_cleanup failures by default
authorMark Andrews <marka@isc.org>
Tue, 21 Mar 2023 03:29:46 +0000 (14:29 +1100)
committerMark Andrews <marka@isc.org>
Mon, 3 Apr 2023 02:44:27 +0000 (12:44 +1000)
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

index 0e53775490f84aeb27dd4981c296dd2cbd13401c..d57cf98d1ef4cdb6933826c91c265e49b95359fc 100644 (file)
@@ -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)
 /*