diff options
Diffstat (limited to 'crypto/rsa')
-rw-r--r-- | crypto/rsa/rsa_lib.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/crypto/rsa/rsa_lib.c b/crypto/rsa/rsa_lib.c index 62b2854ecc..a8afb2cef7 100644 --- a/crypto/rsa/rsa_lib.c +++ b/crypto/rsa/rsa_lib.c @@ -183,17 +183,10 @@ void RSA_free(RSA *r) return; i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_RSA); -#ifdef REF_PRINT - REF_PRINT("RSA", r); -#endif + REF_PRINT_COUNT("RSA", r); if (i > 0) return; -#ifdef REF_CHECK - if (i < 0) { - fprintf(stderr, "RSA_free, bad reference count\n"); - abort(); - } -#endif + REF_ASSERT_ISNT(i < 0); if (r->meth->finish) r->meth->finish(r); @@ -221,15 +214,9 @@ void RSA_free(RSA *r) int RSA_up_ref(RSA *r) { int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA); -#ifdef REF_PRINT - REF_PRINT("RSA", r); -#endif -#ifdef REF_CHECK - if (i < 2) { - fprintf(stderr, "RSA_up_ref, bad reference count\n"); - abort(); - } -#endif + + REF_PRINT_COUNT("RSA", r); + REF_ASSERT_ISNT(i < 2); return ((i > 1) ? 1 : 0); } |