diff --git a/sycl/plugins/level_zero/pi_level_zero.cpp b/sycl/plugins/level_zero/pi_level_zero.cpp index 77e8166b278a..a0e7d01a0830 100644 --- a/sycl/plugins/level_zero/pi_level_zero.cpp +++ b/sycl/plugins/level_zero/pi_level_zero.cpp @@ -459,7 +459,7 @@ pi_result _pi_context::finalize() { // There could be some memory that may have not been deallocated. // For example, zeEventPool could be still alive. std::lock_guard NumEventsLiveInEventPoolGuard( - NumEventsLiveInEventPoolMutex, std::adopt_lock); + NumEventsLiveInEventPoolMutex); if (ZeEventPool && NumEventsLiveInEventPool[ZeEventPool]) zeEventPoolDestroy(ZeEventPool);