summaryrefslogtreecommitdiffstats
path: root/crypto/ex_data.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-12-04 13:15:08 -0500
committerRichard Levitte <levitte@openssl.org>2019-12-14 20:57:35 +0100
commit742ccab318b13a8779d9f9164d479b4a428a6da8 (patch)
tree47e5cb0544e2f74a4fbefcdd30cb65d8078f214f /crypto/ex_data.c
parent4e3ee452d091615e52a43e6e7c6db7d09e260353 (diff)
Deprecate most of debug-memory
Fixes #8322 The leak-checking (and backtrace option, on some platforms) provided by crypto-mdebug and crypto-mdebug-backtrace have been mostly neutered; only the "make malloc fail" capability remains. OpenSSL recommends using the compiler's leak-detection instead. The OPENSSL_DEBUG_MEMORY environment variable is no longer used. CRYPTO_mem_ctrl(), CRYPTO_set_mem_debug(), CRYPTO_mem_leaks(), CRYPTO_mem_leaks_fp() and CRYPTO_mem_leaks_cb() return a failure code. CRYPTO_mem_debug_{malloc,realloc,free}() have been removed. All of the above are now deprecated. Merge (now really small) mem_dbg.c into mem.c Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10572)
Diffstat (limited to 'crypto/ex_data.c')
-rw-r--r--crypto/ex_data.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/crypto/ex_data.c b/crypto/ex_data.c
index 58614b68a3..3cffef897b 100644
--- a/crypto/ex_data.c
+++ b/crypto/ex_data.c
@@ -38,13 +38,8 @@ static EX_CALLBACKS *get_and_lock(OPENSSL_CTX *ctx, int class_index)
global = openssl_ctx_get_ex_data_global(ctx);
if (global == NULL || global->ex_data_lock == NULL) {
/*
- * This can happen in normal operation when using CRYPTO_mem_leaks().
- * The CRYPTO_mem_leaks() function calls OPENSSL_cleanup() which cleans
- * up the locks. Subsequently the BIO that CRYPTO_mem_leaks() uses gets
- * freed, which also attempts to free the ex_data. However
- * CRYPTO_mem_leaks() ensures that the ex_data is freed early (i.e.
- * before OPENSSL_cleanup() is called), so if we get here we can safely
- * ignore this operation. We just treat it as an error.
+ * If we get here, someone (who?) cleaned up the lock, so just
+ * treat it as an error.
*/
return NULL;
}