Skip to content

Commit

Permalink
Merge pull request #2343 from nrspruit/coverity_fixes_l0
Browse files Browse the repository at this point in the history
[L0] fix Coverity issues in memory and timestamps
  • Loading branch information
callumfare authored Nov 21, 2024
2 parents c3bcabf + 257225f commit 28ef4c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/adapters/level_zero/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,8 @@ ur_result_t urEventGetProfilingInfo(

// For timestamped events we have the timestamps ready directly on the event
// handle, so we short-circuit the return.
if (isTimestampedEvent) {
// We don't support user events with timestamps due to requiring the UrQueue.
if (isTimestampedEvent && Event->UrQueue) {
uint64_t ContextStartTime = Event->RecordEventStartTimestamp;
switch (PropName) {
case UR_PROFILING_INFO_COMMAND_QUEUED:
Expand Down
2 changes: 1 addition & 1 deletion source/adapters/level_zero/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@ ur_result_t _ur_buffer::getZeHandle(char *&ZeHandle, access_mode_t AccessMode,
nullptr, 0u, nullptr));
}
if (waitlist.ZeEventList) {
delete waitlist.ZeEventList;
delete[] waitlist.ZeEventList;
}
}
Allocation.Valid = true;
Expand Down

0 comments on commit 28ef4c8

Please sign in to comment.