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: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
8e588e2812
commit
460c5e1d2f
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue