From e2615dff7e62cc0d1d8df07786537a979c2bbcff Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Thu, 23 May 2024 12:07:41 +0100 Subject: [PATCH] [CTS] Fix image test resource leak --- test/conformance/memory/urMemImageCreate.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/conformance/memory/urMemImageCreate.cpp b/test/conformance/memory/urMemImageCreate.cpp index 0ba25bd1c9..7b19ed7232 100644 --- a/test/conformance/memory/urMemImageCreate.cpp +++ b/test/conformance/memory/urMemImageCreate.cpp @@ -185,12 +185,11 @@ TEST_P(urMemImageCreateWithHostPtrFlagsTest, Success) { &image_format, &image_desc, nullptr, host_ptr_buffer.ptr())); - ur_mem_handle_t image_handle = nullptr; + uur::raii::Mem image_handle = nullptr; ASSERT_SUCCESS(urMemImageCreate(context, getParam(), &image_format, &image_desc, host_ptr_buffer.ptr(), - &image_handle)); - ASSERT_NE(nullptr, image_handle); - ASSERT_SUCCESS(urMemRelease(image_handle)); + image_handle.ptr())); + ASSERT_NE(nullptr, image_handle.ptr()); } TEST_P(urMemImageCreateWithHostPtrFlagsTest, InvalidHostPtr) {