Skip to content

Commit 306ff96

Browse files
Fixed possible memory leak on error
1 parent b6dd4d2 commit 306ff96

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dpctl/_sycl_queue.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@ cdef class SyclQueue(_SyclQueue):
771771
free(depEvents)
772772
if (status != 0):
773773
with nogil: DPCTLEvent_Wait(htERef)
774+
DPCTLEvent_Delete(htERef)
774775
raise RuntimeError("Could not submit keep_args_alive host_task")
775776

776777
return SyclEvent._create(htERef)

0 commit comments

Comments
 (0)