summaryrefslogtreecommitdiffstats
path: root/crypto/evp/asymcipher.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2021-02-15 12:31:36 -0500
committerRichard Levitte <levitte@openssl.org>2021-04-18 10:01:31 +0200
commit543e740b95e303790f8fe6ec59458b4ecdcfb56c (patch)
tree261354d5f3154847e0edc9cae3f81d4f14a855ee /crypto/evp/asymcipher.c
parentad72484909abbcb088c52305894b87604ef58de8 (diff)
Standard style for all EVP_xxx_free routines
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14193)
Diffstat (limited to 'crypto/evp/asymcipher.c')
-rw-r--r--crypto/evp/asymcipher.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/evp/asymcipher.c b/crypto/evp/asymcipher.c
index 08c8fb0088..feabe0a793 100644
--- a/crypto/evp/asymcipher.c
+++ b/crypto/evp/asymcipher.c
@@ -391,16 +391,16 @@ static void *evp_asym_cipher_from_algorithm(int name_id,
void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher)
{
- if (cipher != NULL) {
- int i;
-
- CRYPTO_DOWN_REF(&cipher->refcnt, &i, cipher->lock);
- if (i > 0)
- return;
- ossl_provider_free(cipher->prov);
- CRYPTO_THREAD_lock_free(cipher->lock);
- OPENSSL_free(cipher);
- }
+ int i;
+
+ if (cipher == NULL)
+ return;
+ CRYPTO_DOWN_REF(&cipher->refcnt, &i, cipher->lock);
+ if (i > 0)
+ return;
+ ossl_provider_free(cipher->prov);
+ CRYPTO_THREAD_lock_free(cipher->lock);
+ OPENSSL_free(cipher);
}
int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher)