Skip to content

Commit 9239506

Browse files
authored
Merge pull request #1976 from igchor/event_pool_fix
[L0 v2] fix use-after-free
2 parents 522d383 + 94027e3 commit 9239506

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/adapters/level_zero/v2/event_provider_normal.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ provider_pool::provider_pool(ur_context_handle_t context,
3131
desc.count = EVENTS_BURST;
3232
desc.flags = 0;
3333

34+
ze_event_pool_counter_based_exp_desc_t counterBasedExt = {
35+
ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC, nullptr};
36+
3437
if (events == event_type::EVENT_COUNTER) {
35-
ze_event_pool_counter_based_exp_desc_t counterBasedExt = {
36-
ZE_STRUCTURE_TYPE_COUNTER_BASED_EVENT_POOL_EXP_DESC, nullptr};
3738
counterBasedExt.flags =
3839
queue == queue_type::QUEUE_IMMEDIATE
3940
? ZE_EVENT_POOL_COUNTER_BASED_EXP_FLAG_IMMEDIATE

0 commit comments

Comments
 (0)