summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/e_aes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp/e_aes.c')
-rw-r--r--src/lib/libcrypto/evp/e_aes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c
index c7eaafe89b..d6f0124a94 100644
--- a/src/lib/libcrypto/evp/e_aes.c
+++ b/src/lib/libcrypto/evp/e_aes.c
@@ -679,7 +679,7 @@ static int aes_gcm_cleanup(EVP_CIPHER_CTX *c)
679 EVP_AES_GCM_CTX *gctx = c->cipher_data; 679 EVP_AES_GCM_CTX *gctx = c->cipher_data;
680 OPENSSL_cleanse(&gctx->gcm, sizeof(gctx->gcm)); 680 OPENSSL_cleanse(&gctx->gcm, sizeof(gctx->gcm));
681 if (gctx->iv != c->iv) 681 if (gctx->iv != c->iv)
682 OPENSSL_free(gctx->iv); 682 free(gctx->iv);
683 return 1; 683 return 1;
684 } 684 }
685 685
@@ -724,8 +724,8 @@ static int aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
724 if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen)) 724 if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen))
725 { 725 {
726 if (gctx->iv != c->iv) 726 if (gctx->iv != c->iv)
727 OPENSSL_free(gctx->iv); 727 free(gctx->iv);
728 gctx->iv = OPENSSL_malloc(arg); 728 gctx->iv = malloc(arg);
729 if (!gctx->iv) 729 if (!gctx->iv)
730 return 0; 730 return 0;
731 } 731 }