mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
Fix a potential memory leak in crypto/provider_child.c
Fix issue #20063. CLA: trivial Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20163)
This commit is contained in:
parent
0414899887
commit
e788c772b1
@ -135,8 +135,10 @@ static int provider_create_child_cb(const OSSL_CORE_HANDLE *prov, void *cbdata)
|
||||
1)) == NULL)
|
||||
goto err;
|
||||
|
||||
if (!ossl_provider_activate(cprov, 0, 0))
|
||||
if (!ossl_provider_activate(cprov, 0, 0)) {
|
||||
ossl_provider_free(cprov);
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!ossl_provider_set_child(cprov, prov)
|
||||
|| !ossl_provider_add_to_store(cprov, NULL, 0)) {
|
||||
|
Loading…
Reference in New Issue
Block a user