Skip to content

Commit 28ef4c8

Browse files
authored
Merge pull request #2343 from nrspruit/coverity_fixes_l0
[L0] fix Coverity issues in memory and timestamps
2 parents c3bcabf + 257225f commit 28ef4c8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

source/adapters/level_zero/event.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ ur_result_t urEventGetProfilingInfo(
549549

550550
// For timestamped events we have the timestamps ready directly on the event
551551
// handle, so we short-circuit the return.
552-
if (isTimestampedEvent) {
552+
// We don't support user events with timestamps due to requiring the UrQueue.
553+
if (isTimestampedEvent && Event->UrQueue) {
553554
uint64_t ContextStartTime = Event->RecordEventStartTimestamp;
554555
switch (PropName) {
555556
case UR_PROFILING_INFO_COMMAND_QUEUED:

source/adapters/level_zero/memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2240,7 +2240,7 @@ ur_result_t _ur_buffer::getZeHandle(char *&ZeHandle, access_mode_t AccessMode,
22402240
nullptr, 0u, nullptr));
22412241
}
22422242
if (waitlist.ZeEventList) {
2243-
delete waitlist.ZeEventList;
2243+
delete[] waitlist.ZeEventList;
22442244
}
22452245
}
22462246
Allocation.Valid = true;

0 commit comments

Comments
 (0)