Fix memory leak
getLastQueuedCommand(true) will implictly retain the last command, hence if we're not putting it in the waitlist, we should release it.
Change-Id: I1ad4ddcdf1df5237b83e1ea2447eb39a59f7dc3a
[ROCm/clr commit: 9998067174]
Этот коммит содержится в:
коммит произвёл
Vladislav Sytchenko
родитель
89bd6132a1
Коммит
fcd69756c3
@@ -159,10 +159,13 @@ void iHipWaitActiveStreams(amd::HostQueue* blocking_queue, bool wait_null_stream
|
||||
(stream->Null() == wait_null_stream)) {
|
||||
// Get the last valid command
|
||||
amd::Command* command = active_queue->getLastQueuedCommand(true);
|
||||
if ((command != nullptr) &&
|
||||
// Check the current active status
|
||||
(command->status() != CL_COMPLETE)) {
|
||||
eventWaitList.push_back(command);
|
||||
if (command != nullptr) {
|
||||
// Check the current active status
|
||||
if (command->status() != CL_COMPLETE) {
|
||||
eventWaitList.push_back(command);
|
||||
} else {
|
||||
command->release();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user