diff options
author | Richard Levitte <levitte@openssl.org> | 2001-04-05 10:19:12 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2001-04-05 10:19:12 +0000 |
commit | 4ac881ede3c8243a46b7c1db30bd26dd216714b1 (patch) | |
tree | 348d1389a2d0ce37ee7b357aa9d81255a5f9cbbf /crypto/pkcs7 | |
parent | ccd2cd3e64d74b73c3cf7da8963c8a893b752552 (diff) |
Fix couple of memory leaks in PKCS7_dataDecode().
(provided by Stephen)
Diffstat (limited to 'crypto/pkcs7')
-rw-r--r-- | crypto/pkcs7/pk7_doit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c index d0f3ed0411..921195f934 100644 --- a/crypto/pkcs7/pk7_doit.c +++ b/crypto/pkcs7/pk7_doit.c @@ -370,7 +370,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) if (ri == NULL) { PKCS7err(PKCS7_F_PKCS7_DATADECODE, PKCS7_R_NO_RECIPIENT_MATCHES_CERTIFICATE); - return(NULL); + goto err; } jj=EVP_PKEY_size(pkey); @@ -393,7 +393,7 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) BIO_get_cipher_ctx(etmp,&evp_ctx); EVP_CipherInit(evp_ctx,evp_cipher,NULL,NULL,0); if (EVP_CIPHER_asn1_to_param(evp_ctx,enc_alg->parameter) < 0) - return(NULL); + goto err; if (jj != EVP_CIPHER_CTX_key_length(evp_ctx)) { /* Some S/MIME clients don't use the same key |