From 158a8b2c410112975af7f70986c5f1ac40ff4f9f Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Wed, 12 Jun 2024 15:12:07 -0700 Subject: [PATCH] Fix a bug where the wrong API is used to free the memory --- cpp/test/core/memory_type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/test/core/memory_type.cpp b/cpp/test/core/memory_type.cpp index 07ca66ccc1..f020215595 100644 --- a/cpp/test/core/memory_type.cpp +++ b/cpp/test/core/memory_type.cpp @@ -49,7 +49,7 @@ TEST(MemoryTypeFromPointer, Host) auto ptr1 = static_cast(nullptr); cudaMallocHost(&ptr1, 1); EXPECT_EQ(memory_type_from_pointer(ptr1), memory_type::host); - cudaFree(ptr1); + cudaFreeHost(ptr1); auto ptr2 = static_cast(nullptr); EXPECT_EQ(memory_type_from_pointer(ptr2), memory_type::host); }