From 774e13f0b80574a087c0e44e095deaae9f848725 Mon Sep 17 00:00:00 2001 From: tedu Date: Sun, 15 Jun 2014 22:53:21 +0000 Subject: free iv, then cleanse. from Cyril Jouve --- lib/libssl/src/crypto/evp/e_aes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libssl/src') 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; } -- cgit v1.2.3-59-g8ed1b