Fix memory leak if setup fails.
Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
a187e08d85
commit
891eac4604
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user