summaryrefslogtreecommitdiffstats
path: root/crypto/evp
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2016-01-30 12:04:25 -0500
committerRich Salz <rsalz@openssl.org>2016-02-11 12:40:32 -0500
commitf3f1cf8444f439c0be9de04bf3821a20d00fd956 (patch)
tree50d0fc624d4680e6cd734328126cd60a9dc128be /crypto/evp
parent7823d792d0cad3b44ad5389a8d3381becefe7f44 (diff)
Move to REF_DEBUG, for consistency.
Add utility macros REF_ASSERT_NOT and REF_PRINT_COUNT This is also RT 4181 Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/p_lib.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 0626c27e15..1f9f6f010f 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -425,17 +425,10 @@ void EVP_PKEY_free(EVP_PKEY *x)
return;
i = CRYPTO_add(&x->references, -1, CRYPTO_LOCK_EVP_PKEY);
-#ifdef REF_PRINT
- REF_PRINT("EVP_PKEY", x);
-#endif
+ REF_PRINT_COUNT("EVP_PKEY", x);
if (i > 0)
return;
-#ifdef REF_CHECK
- if (i < 0) {
- fprintf(stderr, "EVP_PKEY_free, bad reference count\n");
- abort();
- }
-#endif
+ REF_ASSERT_ISNT(i < 0);
EVP_PKEY_free_it(x);
sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free);
OPENSSL_free(x);