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(
361361 return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
362362 }
363363
364- if (residentDevicesCount && ! residentDevicesIndices ) {
364+ if (residentDevicesCount > 0 && residentDevicesIndices == NULL ) {
365365 LOG_ERR ("Resident devices indices array is NULL, but "
366366 "residentDevicesCount is not zero" );
367367 return UMF_RESULT_ERROR_INVALID_ARGUMENT ;
368368 }
369369
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+
370375 hParams -> device_handles = hDevices ;
371376 hParams -> device_count = deviceCount ;
372377 hParams -> resident_device_indices = residentDevicesIndices ;
You can’t perform that action at this time.
0 commit comments