From c2ed0bb5f435dc8317e8f7e2d64d1eb5efa1975a Mon Sep 17 00:00:00 2001 From: beck <> Date: Thu, 22 May 2014 21:56:02 +0000 Subject: Convert OPENSSL_malloc stuff back to intrinsics, a few were missed as new stuff was brought in. ok miod@ --- src/lib/libcrypto/evp/e_aes.c | 4 ++-- src/lib/libcrypto/evp/e_chacha20poly1305.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/libcrypto/evp') diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index 4da61b8f62..2e81495e5f 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c @@ -1294,7 +1294,7 @@ aead_aes_gcm_init(EVP_AEAD_CTX *ctx, const unsigned char *key, size_t key_len, return 0; } - gcm_ctx = OPENSSL_malloc(sizeof(struct aead_aes_gcm_ctx)); + gcm_ctx = malloc(sizeof(struct aead_aes_gcm_ctx)); if (gcm_ctx == NULL) return 0; @@ -1321,7 +1321,7 @@ aead_aes_gcm_cleanup(EVP_AEAD_CTX *ctx) { struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state; - OPENSSL_free(gcm_ctx); + free(gcm_ctx); } static ssize_t diff --git a/src/lib/libcrypto/evp/e_chacha20poly1305.c b/src/lib/libcrypto/evp/e_chacha20poly1305.c index 75ff7f209c..7e32668b7f 100644 --- a/src/lib/libcrypto/evp/e_chacha20poly1305.c +++ b/src/lib/libcrypto/evp/e_chacha20poly1305.c @@ -85,7 +85,7 @@ aead_chacha20_poly1305_init(EVP_AEAD_CTX *ctx, const unsigned char *key, if (key_len != sizeof(c20_ctx->key)) return 0; /* internal error - EVP_AEAD_CTX_init should catch this. */ - c20_ctx = OPENSSL_malloc(sizeof(struct aead_chacha20_poly1305_ctx)); + c20_ctx = malloc(sizeof(struct aead_chacha20_poly1305_ctx)); if (c20_ctx == NULL) return 0; @@ -101,7 +101,7 @@ aead_chacha20_poly1305_cleanup(EVP_AEAD_CTX *ctx) { struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state; OPENSSL_cleanse(c20_ctx->key, sizeof(c20_ctx->key)); - OPENSSL_free(c20_ctx); + free(c20_ctx); } static void -- cgit v1.2.3-55-g6feb