diff options
author | Richard Levitte <levitte@openssl.org> | 2015-12-02 00:49:35 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-12-07 17:40:20 +0100 |
commit | bfb0641f932490c2e7fb5f9f7cb4a88017a5abfa (patch) | |
tree | 6b6b0a9dfe55b4b3a2e5961ed1778dd156128f35 /crypto/rand | |
parent | 959ed5316c84d0e12ad18acfd40cefe15603ddfb (diff) |
Cleanup: fix all sources that used EVP_MD_CTX_(create|init|destroy)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/rand')
-rw-r--r-- | crypto/rand/md_rand.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index ec42fc29f0..c2dfce419a 100644 --- a/crypto/rand/md_rand.c +++ b/crypto/rand/md_rand.c @@ -234,7 +234,7 @@ static int rand_add(const void *buf, int num, double add) * hash function. */ - m = EVP_MD_CTX_create(); + m = EVP_MD_CTX_new(); if (m == NULL) goto err; @@ -355,7 +355,7 @@ static int rand_add(const void *buf, int num, double add) #endif rv = 1; err: - EVP_MD_CTX_destroy(m); + EVP_MD_CTX_free(m); return rv; } @@ -412,7 +412,7 @@ static int rand_bytes(unsigned char *buf, int num, int pseudo) if (num <= 0) return 1; - m = EVP_MD_CTX_create(); + m = EVP_MD_CTX_new(); if (m == NULL) goto err_mem; @@ -600,7 +600,7 @@ static int rand_bytes(unsigned char *buf, int num, int pseudo) ASYNC_unblock_pause(); CRYPTO_w_unlock(CRYPTO_LOCK_RAND); - EVP_MD_CTX_destroy(m); + EVP_MD_CTX_free(m); if (ok) return (1); else if (pseudo) @@ -613,11 +613,11 @@ static int rand_bytes(unsigned char *buf, int num, int pseudo) } err: RANDerr(RAND_F_RAND_BYTES, ERR_R_EVP_LIB); - EVP_MD_CTX_destroy(m); + EVP_MD_CTX_free(m); return 0; err_mem: RANDerr(RAND_F_RAND_BYTES, ERR_R_MALLOC_FAILURE); - EVP_MD_CTX_destroy(m); + EVP_MD_CTX_free(m); return 0; } |