From 63ac798b50028500d17dc60d4547666243e1e746 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 29 Mar 2018 15:03:19 -0400 Subject: [PATCH] P4 to Git Change 1534589 by vsytchen@vsytchen-ocl-win10 on 2018/03/29 14:54:53 SWDEV-79445 - OCL generic changes and code clean-up Return nullptr if creating a suballocation fails Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#59 edit --- rocclr/runtime/device/pal/palresource.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rocclr/runtime/device/pal/palresource.cpp b/rocclr/runtime/device/pal/palresource.cpp index 98436de3c3..05bf9c7888 100644 --- a/rocclr/runtime/device/pal/palresource.cpp +++ b/rocclr/runtime/device/pal/palresource.cpp @@ -1895,6 +1895,8 @@ GpuMemoryReference* MemorySubAllocator::Allocate(Pal::gpusize size, Pal::gpusize // If we have found a valid chunk, then suballocate memory if (Pal::Result::Success == allocator->Allocate(size, alignment, offset)) { return mem_ref; + } else { + mem_ref = nullptr; } } if ((mem_ref == nullptr) && !CreateChunk(reserved_va)) {