summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongsun Lee <ds73.lee@samsung.com>2018-03-21 02:50:26 (GMT)
committerDongsun Lee <ds73.lee@samsung.com>2018-03-22 09:37:47 (GMT)
commit26886364827e02666560aaf8a156b87df681061e (patch)
tree1bcfc0fdf3df0a9b3db77c0ee15eb4ab0b0d69a2
parent1f687be4b378ad7a070e9f703cdc84b2781e0d50 (diff)
downloadxmlsec1-26886364827e02666560aaf8a156b87df681061e.zip
xmlsec1-26886364827e02666560aaf8a156b87df681061e.tar.gz
xmlsec1-26886364827e02666560aaf8a156b87df681061e.tar.bz2
- 47982: Resource leak - 45941: Resource leak Change-Id: Ibf2e560cdaa0d0921b6af34289abd692a85b0be1 Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
-rw-r--r--src/gcrypt/kw_aes.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gcrypt/kw_aes.c b/src/gcrypt/kw_aes.c
index 32bc5cc..16977ff 100644
--- a/src/gcrypt/kw_aes.c
+++ b/src/gcrypt/kw_aes.c
@@ -499,6 +499,7 @@ xmlSecGCryptKWAesBlockEncrypt(const xmlSecByte * in, xmlSecSize inSize,
"gcry_cipher_setkey",
XMLSEC_ERRORS_R_CRYPTO_FAILED,
XMLSEC_GCRYPT_REPORT_ERROR(err));
+ gcry_cipher_close(cipherCtx);
return(-1);
}
@@ -510,6 +511,7 @@ xmlSecGCryptKWAesBlockEncrypt(const xmlSecByte * in, xmlSecSize inSize,
"gcry_cipher_setiv",
XMLSEC_ERRORS_R_CRYPTO_FAILED,
XMLSEC_GCRYPT_REPORT_ERROR(err));
+ gcry_cipher_close(cipherCtx);
return(-1);
}
@@ -561,6 +563,7 @@ xmlSecGCryptKWAesBlockDecrypt(const xmlSecByte * in, xmlSecSize inSize,
"gcry_cipher_setkey",
XMLSEC_ERRORS_R_CRYPTO_FAILED,
XMLSEC_GCRYPT_REPORT_ERROR(err));
+ gcry_cipher_close(cipherCtx);
return(-1);
}
@@ -572,6 +575,7 @@ xmlSecGCryptKWAesBlockDecrypt(const xmlSecByte * in, xmlSecSize inSize,
"gcry_cipher_setiv",
XMLSEC_ERRORS_R_CRYPTO_FAILED,
XMLSEC_GCRYPT_REPORT_ERROR(err));
+ gcry_cipher_close(cipherCtx);
return(-1);
}