diff --git a/cub/test/catch2_test_vsmem.cu b/cub/test/catch2_test_vsmem.cu index a4ae61e08c3..2c8389f9c97 100644 --- a/cub/test/catch2_test_vsmem.cu +++ b/cub/test/catch2_test_vsmem.cu @@ -449,6 +449,7 @@ CUB_TEST("Virtual shared memory works within algorithms", "[util][vsmem]", type_ // Setup vsmem test launch_config_test_info_t* launch_config_info = nullptr; cudaMallocHost(&launch_config_info, sizeof(launch_config_test_info_t)); + c2h::device_vector device_kernel_test_info(1); dummy_algorithm( in_ptr, out_ptr, num_items, thrust::raw_pointer_cast(device_kernel_test_info.data()), launch_config_info); @@ -474,4 +475,6 @@ CUB_TEST("Virtual shared memory works within algorithms", "[util][vsmem]", type_ // The virtual shared memory helper pads vsmem to a multiple of a line size, hence the range check REQUIRE(launch_config_info->config_vsmem_per_block >= expected_vsmem_per_block); } + + cudaFreeHost(launch_config_info); }