ike-sa-manager: Unlock mutex if allocating SPI fails to avoid lock contention

Fixes: 5d91d8c46937 ("Check rng return value when generating SPIs in ike_sa_manager_t")
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
This commit is contained in:
Thomas Egerer 2024-03-20 10:11:17 +00:00 committed by Tobias Brunner
parent dea8493f3a
commit f3c8e02c69

View File

@ -1151,6 +1151,7 @@ static status_t check_and_put_init_hash(private_ike_sa_manager_t *this,
spi = get_spi(this);
if (!spi)
{
mutex->unlock(mutex);
return FAILED;
}