projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29f4c35
)
Don't leak EVP_MD_CTX on error path
author
Matt Caswell
<matt@openssl.org>
Wed, 27 Apr 2016 12:22:29 +0000
(13:22 +0100)
committer
Matt Caswell
<matt@openssl.org>
Thu, 28 Apr 2016 12:13:09 +0000
(13:13 +0100)
The cms_SignerInfo_content_sign() function allocated an EVP_MD_CTX but
then failed to free it on an error path.
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/cms/cms_sd.c
patch
|
blob
|
history
diff --git
a/crypto/cms/cms_sd.c
b/crypto/cms/cms_sd.c
index 151f40f9a54f07c261cd27e52ef1ba653a4a04f3..e4739b39d9e1a219cb61248e417ed12c621b6c08 100644
(file)
--- a/
crypto/cms/cms_sd.c
+++ b/
crypto/cms/cms_sd.c
@@
-588,7
+588,7
@@
static int cms_SignerInfo_content_sign(CMS_ContentInfo *cms,
if (!si->pkey) {
CMSerr(CMS_F_CMS_SIGNERINFO_CONTENT_SIGN, CMS_R_NO_PRIVATE_KEY);
-
return 0
;
+
goto err
;
}
if (!cms_DigestAlgorithm_find_ctx(mctx, chain, si->digestAlgorithm))