summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/e_chacha20poly1305.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/evp/e_chacha20poly1305.c4
1 files changed, 2 insertions, 2 deletions
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,
85 if (key_len != sizeof(c20_ctx->key)) 85 if (key_len != sizeof(c20_ctx->key))
86 return 0; /* internal error - EVP_AEAD_CTX_init should catch this. */ 86 return 0; /* internal error - EVP_AEAD_CTX_init should catch this. */
87 87
88 c20_ctx = OPENSSL_malloc(sizeof(struct aead_chacha20_poly1305_ctx)); 88 c20_ctx = malloc(sizeof(struct aead_chacha20_poly1305_ctx));
89 if (c20_ctx == NULL) 89 if (c20_ctx == NULL)
90 return 0; 90 return 0;
91 91
@@ -101,7 +101,7 @@ aead_chacha20_poly1305_cleanup(EVP_AEAD_CTX *ctx)
101{ 101{
102 struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state; 102 struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state;
103 OPENSSL_cleanse(c20_ctx->key, sizeof(c20_ctx->key)); 103 OPENSSL_cleanse(c20_ctx->key, sizeof(c20_ctx->key));
104 OPENSSL_free(c20_ctx); 104 free(c20_ctx);
105} 105}
106 106
107static void 107static void