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:
committed by
Tobias Brunner
parent
dea8493f3a
commit
f3c8e02c69
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user