projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Don't leak memory on error in PKCS12_key_gen_uni
[openssl.git]
/
crypto
/
pkcs12
/
p12_key.c
diff --git
a/crypto/pkcs12/p12_key.c
b/crypto/pkcs12/p12_key.c
index 6a9a3254b14130417c4b3b3ba0226aa299f7f70c..1a1ea7059c5f2a3f2c89a928746a25a53d450524 100644
(file)
--- a/
crypto/pkcs12/p12_key.c
+++ b/
crypto/pkcs12/p12_key.c
@@
-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);