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>
This commit is contained in:
Rich Salz
2016-01-30 12:04:25 -05:00
committed by Rich Salz
parent 7823d792d0
commit f3f1cf8444
30 changed files with 105 additions and 226 deletions

View File

@@ -335,17 +335,10 @@ void ssl_cert_free(CERT *c)
return;
i = CRYPTO_add(&c->references, -1, CRYPTO_LOCK_SSL_CERT);
#ifdef REF_PRINT
REF_PRINT("CERT", c);
#endif
REF_PRINT_COUNT("CERT", c);
if (i > 0)
return;
#ifdef REF_CHECK
if (i < 0) {
fprintf(stderr, "ssl_cert_free, bad reference count\n");
abort(); /* ok */
}
#endif
REF_ASSERT_ISNT(i < 0);
#ifndef OPENSSL_NO_DH
EVP_PKEY_free(c->dh_tmp);