summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-06-15 22:53:21 +0000
committertedu <tedu@openbsd.org>2014-06-15 22:53:21 +0000
commit774e13f0b80574a087c0e44e095deaae9f848725 (patch)
tree5a70b2e201a850a7794dfe70d0b628ec2b7f0d43 /lib/libssl/src
parentUse sizeof(struct file *) consistently for memcpy()'ing fd_ofiles. (diff)
downloadwireguard-openbsd-774e13f0b80574a087c0e44e095deaae9f848725.tar.xz
wireguard-openbsd-774e13f0b80574a087c0e44e095deaae9f848725.zip
free iv, then cleanse. from Cyril Jouve
Diffstat (limited to 'lib/libssl/src')
-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;
}