瀏覽代碼

Fix crash when writing back to main memory requires allocating data there

Samuel Thibault 12 年之前
父節點
當前提交
21331075a5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/datawizard/copy_driver.c

+ 1 - 1
src/datawizard/copy_driver.c

@@ -354,7 +354,7 @@ int __attribute__((warn_unused_result)) _starpu_driver_copy_data_1_to_1(starpu_d
 		if (!may_alloc)
 			return -ENOMEM;
 
-		ret_alloc = _starpu_allocate_memory_on_node(handle, dst_replicate,req->prefetch);
+		ret_alloc = _starpu_allocate_memory_on_node(handle, dst_replicate, req ? req->prefetch : 0);
 		if (ret_alloc)
 			return -ENOMEM;
 	}