evp: fix coverity 1470561: resource leak

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14596)
This commit is contained in:
Pauli 2021-03-18 12:57:13 +10:00
parent 9b0f76e12f
commit 7153f54437

View File

@ -313,6 +313,7 @@ static EVP_PKEY_CTX *int_ctx_new(OSSL_LIB_CTX *libctx,
if (propquery != NULL) {
ret->propquery = OPENSSL_strdup(propquery);
if (ret->propquery == NULL) {
OPENSSL_free(ret);
EVP_KEYMGMT_free(keymgmt);
return NULL;
}