Ensure tag address will be null before freeing tag allocation

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk 2021-05-27 12:23:40 +00:00 committed by Compute-Runtime-Automation
parent 6088b71256
commit 79903d6fce
1 changed files with 4 additions and 0 deletions

View File

@ -215,8 +215,12 @@ void CommandStreamReceiver::cleanupResources() {
}
if (tagsMultiAllocation) {
//Null tag address to prevent waiting for tag update when freeing it
tagAllocation = nullptr;
tagAddress = nullptr;
DEBUG_BREAK_IF(tagAllocation != nullptr);
DEBUG_BREAK_IF(tagAddress != nullptr);
for (auto graphicsAllocation : tagsMultiAllocation->getGraphicsAllocations()) {
getMemoryManager()->freeGraphicsMemory(graphicsAllocation);
}