提交 891eac46 编写于 作者: D Dr. Stephen Henson

Fix memory leak if setup fails.

Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 a187e08d
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册