Skip to content

Commit e53cae2

Browse files
Fixed possible memory leak on error
1 parent 50e291b commit e53cae2

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
@@ -784,6 +784,7 @@ cdef class SyclQueue(_SyclQueue):
784784
free(depEvents)
785785
if (status != 0):
786786
with nogil: DPCTLEvent_Wait(htERef)
787+
DPCTLEvent_Delete(htERef)
787788
raise RuntimeError("Could not submit keep_args_alive host_task")
788789

789790
return SyclEvent._create(htERef)

0 commit comments

Comments
 (0)