diff options
Diffstat (limited to 'src/crypto/dsa/dsa.c')
-rw-r--r-- | src/crypto/dsa/dsa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/dsa/dsa.c b/src/crypto/dsa/dsa.c index e8e3d73..65444b1 100644 --- a/src/crypto/dsa/dsa.c +++ b/src/crypto/dsa/dsa.c @@ -123,7 +123,7 @@ void DSA_free(DSA *dsa) { return; } - if (CRYPTO_add(&dsa->references, -1, CRYPTO_LOCK_DSA) > 0) { + if (!CRYPTO_refcount_dec_and_test_zero(&dsa->references)) { return; } @@ -146,7 +146,7 @@ void DSA_free(DSA *dsa) { } int DSA_up_ref(DSA *dsa) { - CRYPTO_add(&dsa->references, 1, CRYPTO_LOCK_DSA); + CRYPTO_refcount_inc(&dsa->references); return 1; } |