Skip to content

Commit 46cf37f

Browse files
committed
[OpenCL] Fix memory leak by avoiding duplicate calls in urMemBufferCreate
1 parent 192e940 commit 46cf37f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/adapters/opencl/memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urMemBufferCreate(
264264
*phBuffer = reinterpret_cast<ur_mem_handle_t>(FuncPtr(
265265
CLContext, PropertiesIntel.data(), static_cast<cl_mem_flags>(flags),
266266
size, pProperties->pHost, cl_adapter::cast<cl_int *>(&RetErr)));
267-
CL_RETURN_ON_FAILURE(RetErr);
267+
return mapCLErrorToUR(RetErr);
268268
}
269269
}
270270

0 commit comments

Comments
 (0)