summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongsun Lee <ds73.lee@samsung.com>2018-03-21 11:50:26 +0900
committerDongsun Lee <ds73.lee@samsung.com>2018-03-22 18:37:47 +0900
commit26886364827e02666560aaf8a156b87df681061e (patch)
tree1bcfc0fdf3df0a9b3db77c0ee15eb4ab0b0d69a2
parent1f687be4b378ad7a070e9f703cdc84b2781e0d50 (diff)
downloadxmlsec1-submit/tizen/20180403.094824.tar.gz
xmlsec1-submit/tizen/20180403.094824.tar.bz2
xmlsec1-submit/tizen/20180403.094824.zip
Fix Coverity defectssubmit/tizen/20180403.094824
- 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 32bc5cce..16977ff5 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);
}