提交 460c5e1d 编写于 作者: M Matt Caswell

Don't leak memory on error in PKCS12_key_gen_uni

The PKCS12_key_gen_uni() had one error path which did not free memory
correctly.
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 8e588e28
......@@ -129,7 +129,7 @@ int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt,
v = EVP_MD_block_size(md_type);
u = EVP_MD_size(md_type);
if (u < 0)
return 0;
goto err;
D = OPENSSL_malloc(v);
Ai = OPENSSL_malloc(u);
B = OPENSSL_malloc(v + 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册