diff options
author | jsg <> | 2015-05-15 11:00:14 +0000 |
---|---|---|
committer | jsg <> | 2015-05-15 11:00:14 +0000 |
commit | 5e21cdbca851c965cd196f1d77d376bda7ff1e4f (patch) | |
tree | f00dd64612742b35f7b46f91be93e5056960a0c1 /src/lib/libcrypto/pkcs12/p12_decr.c | |
parent | dfd58b2d262bb801a9048813d922b51c08607ba1 (diff) | |
download | openbsd-5e21cdbca851c965cd196f1d77d376bda7ff1e4f.tar.gz openbsd-5e21cdbca851c965cd196f1d77d376bda7ff1e4f.tar.bz2 openbsd-5e21cdbca851c965cd196f1d77d376bda7ff1e4f.zip |
Fix return paths with missing EVP_CIPHER_CTX_cleanup() calls.
ok doug@
Diffstat (limited to 'src/lib/libcrypto/pkcs12/p12_decr.c')
-rw-r--r-- | src/lib/libcrypto/pkcs12/p12_decr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_decr.c b/src/lib/libcrypto/pkcs12/p12_decr.c index 13be237b4c..4cccf43d3f 100644 --- a/src/lib/libcrypto/pkcs12/p12_decr.c +++ b/src/lib/libcrypto/pkcs12/p12_decr.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p12_decr.c,v 1.14 2015/02/14 12:43:07 miod Exp $ */ | 1 | /* $OpenBSD: p12_decr.c,v 1.15 2015/05/15 11:00:14 jsg Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -77,9 +77,10 @@ PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass, int passlen, | |||
77 | /* Decrypt data */ | 77 | /* Decrypt data */ |
78 | if (!EVP_PBE_CipherInit(algor->algorithm, pass, passlen, | 78 | if (!EVP_PBE_CipherInit(algor->algorithm, pass, passlen, |
79 | algor->parameter, &ctx, en_de)) { | 79 | algor->parameter, &ctx, en_de)) { |
80 | out = NULL; | ||
80 | PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT, | 81 | PKCS12err(PKCS12_F_PKCS12_PBE_CRYPT, |
81 | PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR); | 82 | PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR); |
82 | return NULL; | 83 | goto err; |
83 | } | 84 | } |
84 | 85 | ||
85 | if (!(out = malloc(inlen + EVP_CIPHER_CTX_block_size(&ctx)))) { | 86 | if (!(out = malloc(inlen + EVP_CIPHER_CTX_block_size(&ctx)))) { |