Skip to content

Commit 0031721

Browse files
committed
calling release from cleanup conditional
Signed-off-by: Byoungro So <byoungro.so@intel.com>
1 parent 0b8e574 commit 0031721

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5247,7 +5247,8 @@ pi_result _pi_event::cleanup(pi_queue LockedQueue) {
52475247
// NOTE: that this needs to be done only once for an event so
52485248
// this is guarded with the CleanedUp flag.
52495249
//
5250-
PI_CALL(EventRelease(this, LockedQueue));
5250+
if (RefCount > 0)
5251+
PI_CALL(EventRelease(this, LockedQueue));
52515252
}
52525253

52535254
// Make a list of all the dependent events that must have signalled

0 commit comments

Comments
 (0)