From ddfd919a62e2adf2ba16c0c80ee2509c72f7090c Mon Sep 17 00:00:00 2001 From: Saleel Kudchadker Date: Thu, 21 Apr 2022 15:57:44 -0700 Subject: [PATCH] SWDEV-333237 - Release command before queing a marker Change-Id: I5343c4b7ade2dc68efa7454a919a6657726c45d3 --- rocclr/platform/commandqueue.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rocclr/platform/commandqueue.cpp b/rocclr/platform/commandqueue.cpp index daae776bd5..339239b831 100644 --- a/rocclr/platform/commandqueue.cpp +++ b/rocclr/platform/commandqueue.cpp @@ -113,7 +113,11 @@ void HostQueue::finish() { return; } } + if (nullptr == command || !isCacheFlushed) { + if (nullptr != command) { + command->release(); + } // Send a finish to make sure we finished all commands command = new Marker(*this, false); if (command == NULL) {