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

Fixes: 5d91d8c469 ("Check rng return value when generating SPIs in ike_sa_manager_t")
Signed-off-by: Thomas Egerer <[email protected]>
This commit is contained in:
Thomas Egerer
2024-03-20 13:18:57 +01:00
committed by Tobias Brunner
parent dea8493f3a
commit f3c8e02c69
+1
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;
}