Commit 460c5e1d authored by Matt Caswell's avatar Matt Caswell
Browse files

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: default avatarRichard Levitte <levitte@openssl.org>
parent 8e588e28
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);