File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -361,12 +361,17 @@ umf_result_t umfLevelZeroMemoryProviderParamsSetResidentDevices(
361
361
return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
362
362
}
363
363
364
- if (residentDevicesCount && ! residentDevicesIndices ) {
364
+ if (residentDevicesCount > 0 && residentDevicesIndices == NULL ) {
365
365
LOG_ERR ("Resident devices indices array is NULL, but "
366
366
"residentDevicesCount is not zero" );
367
367
return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
368
368
}
369
369
370
+ if (deviceCount > 0 && hDevices == NULL ) {
371
+ LOG_ERR ("All devices array is NULL, but deviceCount is not zero" );
372
+ return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
373
+ }
374
+
370
375
hParams -> device_handles = hDevices ;
371
376
hParams -> device_count = deviceCount ;
372
377
hParams -> resident_device_indices = residentDevicesIndices ;
You can’t perform that action at this time.
0 commit comments