SWDEV-337703 - nullptr check for hipMallocArray
Change-Id: I3b1077e236ccda346d337109014ef7fd2e693ec6
[ROCm/clr commit: 8e28413a9e]
Этот коммит содержится в:
коммит произвёл
Payam Ghafari
родитель
48350aea01
Коммит
de626141ee
@@ -971,6 +971,9 @@ hipError_t hipMallocArray(hipArray** array,
|
||||
size_t height,
|
||||
unsigned int flags) {
|
||||
HIP_INIT_API(hipMallocArray, array, desc, width, height, flags);
|
||||
if (array == nullptr || desc == nullptr) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
CHECK_STREAM_CAPTURE_SUPPORTED();
|
||||
HIP_ARRAY3D_DESCRIPTOR allocateArray = {width,
|
||||
height,
|
||||
@@ -996,6 +999,9 @@ hipError_t hipMalloc3DArray(hipArray_t* array,
|
||||
hipExtent extent,
|
||||
unsigned int flags) {
|
||||
HIP_INIT_API(hipMalloc3DArray, array, desc, extent, flags);
|
||||
if (array == nullptr || desc == nullptr) {
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
CHECK_STREAM_CAPTURE_SUPPORTED();
|
||||
HIP_ARRAY3D_DESCRIPTOR allocateArray = {extent.width,
|
||||
extent.height,
|
||||
|
||||
Ссылка в новой задаче
Block a user