mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
crypto/provider_core.c: Avoid calling unlock two times
Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18641)
This commit is contained in:
parent
3211266aa2
commit
61f510600e
@ -641,7 +641,7 @@ int ossl_provider_add_to_store(OSSL_PROVIDER *prov, OSSL_PROVIDER **actualprov,
|
||||
if (!ossl_provider_up_ref(actualtmp)) {
|
||||
ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE);
|
||||
actualtmp = NULL;
|
||||
goto err;
|
||||
return 0;
|
||||
}
|
||||
*actualprov = actualtmp;
|
||||
}
|
||||
@ -665,8 +665,6 @@ int ossl_provider_add_to_store(OSSL_PROVIDER *prov, OSSL_PROVIDER **actualprov,
|
||||
|
||||
err:
|
||||
CRYPTO_THREAD_unlock(store->lock);
|
||||
if (actualprov != NULL)
|
||||
ossl_provider_free(*actualprov);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user