summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-06-15 22:53:22 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-06-15 22:53:22 +0000
commit86237c6f2c785107ae29608513b0fbe60b8c3fd1 (patch)
treec04e4180a66ef2464b0886fd794b97c0e635e273 /lib/libssl
parenta92394fce55812a7215f98cc7109cd9cf547f15d (diff)
free iv, then cleanse. from Cyril Jouve
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/src/crypto/evp/e_aes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/evp/e_aes.c b/lib/libssl/src/crypto/evp/e_aes.c
index 8ee93c4bbd1..f40bcf8bd38 100644
--- a/lib/libssl/src/crypto/evp/e_aes.c
+++ b/lib/libssl/src/crypto/evp/e_aes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: e_aes.c,v 1.21 2014/06/15 15:41:25 jsing Exp $ */
+/* $OpenBSD: e_aes.c,v 1.22 2014/06/15 22:53:21 tedu Exp $ */
/* ====================================================================
* Copyright (c) 2001-2011 The OpenSSL Project. All rights reserved.
*
@@ -651,9 +651,9 @@ aes_gcm_cleanup(EVP_CIPHER_CTX *c)
{
EVP_AES_GCM_CTX *gctx = c->cipher_data;
- OPENSSL_cleanse(gctx, sizeof(*gctx));
if (gctx->iv != c->iv)
free(gctx->iv);
+ OPENSSL_cleanse(gctx, sizeof(*gctx));
return 1;
}