mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
ossl_provider_new(): Fix memory leak on error
Fixes #24095 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24100)
This commit is contained in:
parent
682ed1b86e
commit
875db35ac6
@ -564,8 +564,10 @@ OSSL_PROVIDER *ossl_provider_new(OSSL_LIB_CTX *libctx, const char *name,
|
||||
if (params[i].data_type != OSSL_PARAM_UTF8_STRING)
|
||||
continue;
|
||||
if (ossl_provider_info_add_parameter(&template, params[i].key,
|
||||
(char *)params[i].data) <= 0)
|
||||
(char *)params[i].data) <= 0) {
|
||||
sk_INFOPAIR_pop_free(template.parameters, infopair_free);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user