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:
a187e08
)
Fix memory leak if setup fails.
author
Dr. Stephen Henson
<steve@openssl.org>
Sat, 1 Aug 2015 14:37:44 +0000
(15:37 +0100)
committer
Dr. Stephen Henson
<steve@openssl.org>
Wed, 12 Aug 2015 12:54:56 +0000
(13:54 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/cms/cms_enc.c
patch
|
blob
|
history
diff --git
a/crypto/cms/cms_enc.c
b/crypto/cms/cms_enc.c
index f9556acc2e632228c073a31e964b98636d29b5d8..16b42251d19224253b73e8c033e4b22e11a5d420 100644
(file)
--- a/
crypto/cms/cms_enc.c
+++ b/
crypto/cms/cms_enc.c
@@
-194,7
+194,7
@@
BIO *cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec)
ok = 1;
err:
- if (!keep_key) {
+ if (!keep_key
|| !ok
) {
OPENSSL_clear_free(ec->key, ec->keylen);
ec->key = NULL;
}