fix: Set control block in buffer object handle wrapper to null after deletion

Related-To: HSD-18039543925

Signed-off-by: Slawomir Milczarek <slawomir.milczarek@intel.com>
This commit is contained in:
Slawomir Milczarek
2024-08-29 07:52:13 +00:00
committed by Compute-Runtime-Automation
parent a9cb7876a5
commit 0258667a6e
2 changed files with 2 additions and 1 deletions

View File

@@ -65,6 +65,7 @@ BufferObjectHandleWrapper::~BufferObjectHandleWrapper() {
if (controlBlock->refCount == 0 && controlBlock->weakRefCount == 0) {
lock.unlock();
delete controlBlock;
controlBlock = nullptr;
}
}

View File

@@ -76,7 +76,7 @@ class BufferObjectHandleWrapper {
int boHandle{};
Ownership ownership{Ownership::strong};
ControlBlock *controlBlock{};
ControlBlock *controlBlock{nullptr};
};
class BufferObject {