瀏覽代碼

Making sure the cuda_to_cuda function pointer is not NULL in copy_driver.c

[scan-build] Called function pointer is null (null dereference)
Cyril Roelandt 13 年之前
父節點
當前提交
cd510c84b8
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/datawizard/copy_driver.c

+ 1 - 0
src/datawizard/copy_driver.c

@@ -170,6 +170,7 @@ static int copy_data_1_to_1_generic(starpu_data_handle handle, struct starpu_dat
 		/* CUDA - CUDA transfer */
 		STARPU_ASSERT(copy_methods->cuda_to_cuda || copy_methods->cuda_to_cuda_async);
 		if (!req || !copy_methods->cuda_to_cuda_async) {
+			STARPU_ASSERT(copy_methods->cuda_to_cuda);
 			/* this is not associated to a request so it's synchronous */
 			copy_methods->cuda_to_cuda(src_interface, src_node, dst_interface, dst_node);
 		}