utils: Destroy semaphores after use