소스 검색

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 14 년 전
부모
커밋
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);
 		}