Open
Description
There are many other places in the function which have the same issue, but I will use the following snippet to illustrate it:
llvm/unified-runtime/source/adapters/level_zero/memory.cpp
Lines 2101 to 2124 in 635c62a
The problem is that every time we do ZE2UR_CALL
, it may do plain return
from the function if error is encountered. If that happens, memory allocated in waitlist.ZeEventList
is not deallocated.
This issue was discovered by the Coverity, its CID is 520798