pgbackrest.git / summary / log / commit / refs
commit e67792980249b2e35c81d26d2fa574bab52250cb
Author: David Steele <david@pgmasters.net>
Date: Wed May 06 22:09:11 2020 +0000
Fix leak in CipherBlock object.
EVP_CIPHER_CTX_cleanup() was being called instead of EVP_CIPHER_CTX_free() so most of the memory was being freed but not all of it.
This leak was masked by Valgrind suppressions which are only applicable to Ubuntu 12.04, which will be addressed in a future commit.
src/common/crypto/cipherBlock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/crypto/cipherBlock.c b/src/common/crypto/cipherBlock.c
index d9bc7db76..693f58d03 100644
--- a/src/common/crypto/cipherBlock.c
+++ b/src/common/crypto/cipherBlock.c
@@ -77,7 +77,7 @@ Free cipher context
***********************************************************************************************************************************/
OBJECT_DEFINE_FREE_RESOURCE_BEGIN(CIPHER_BLOCK, LOG, logLevelTrace)
{
- EVP_CIPHER_CTX_cleanup(this->cipherContext);
+ EVP_CIPHER_CTX_free(this->cipherContext);
}
OBJECT_DEFINE_FREE_RESOURCE_END(LOG);
[parent: 10a5182d626b]