diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp index 8abec94838..b2270be8f2 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/amd_gpu_agent.cpp @@ -555,7 +555,7 @@ void GpuAgent::InitScratchPool() { } #endif - void* scratch_base; + void* scratch_base = nullptr; HSAKMT_STATUS err = hsaKmtAllocMemory(node_id(), max_scratch_len, flags, &scratch_base); assert(err == HSAKMT_STATUS_SUCCESS && "hsaKmtAllocMemory(Scratch) failed");