diff options
author | jwalch <jeremy.walch@gmail.com> | 2020-10-29 10:52:52 -0400 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2020-10-30 22:38:25 +0300 |
commit | 908cf7cefbb2a4c2a8ea1dd4798d1e689db6e3ed (patch) | |
tree | cefd8e03deee79c051ad3063f108022042560846 /crypto/evp/evp_pkey.c | |
parent | 62a3614372b8171d2f9f9e20aee07ab3002949bd (diff) |
Patch leak in EVP_PKEY2PKCS8() error path
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/13278)
Diffstat (limited to 'crypto/evp/evp_pkey.c')
-rw-r--r-- | crypto/evp/evp_pkey.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/evp/evp_pkey.c b/crypto/evp/evp_pkey.c index 9e7c978656..b5a8f1cd72 100644 --- a/crypto/evp/evp_pkey.c +++ b/crypto/evp/evp_pkey.c @@ -78,7 +78,7 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(const EVP_PKEY *pkey) /* Force a key downgrade if that's possible */ /* TODO(3.0) Is there a better way for provider-native keys? */ if (EVP_PKEY_get0(pkey) == NULL) - return NULL; + goto error; if (pkey->ameth) { if (pkey->ameth->priv_encode) { |