commit | 1ba7c5124cdb1b67a5fd17a9d1ae3476488feaeb | [log] [tgz] |
---|---|---|
author | John Reck <jreck@google.com> | Fri May 19 14:20:06 2023 -0400 |
committer | John Reck <jreck@google.com> | Fri May 19 14:24:21 2023 -0400 |
tree | 75fad122beef2ecb711e614ce237de8b263d5ff2 | |
parent | aa8f76af92cc0f706e0bd13508c7b6b596e0aac4 [diff] |
Fix typo in FreeBufferNegative test Wrong buffer was being free'd, triggering ASAN violations Fixes: 278138497 Test: this Change-Id: I7be7c85a55a58d01576324d2cd201e5a03e88283
diff --git a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp index 2ec98d4..0ddb236 100644 --- a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp +++ b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
@@ -677,7 +677,7 @@ const native_handle_t* clonedBufferHandle; ASSERT_NO_FATAL_FAILURE(clonedBufferHandle = mGralloc->allocate(mDummyDescriptorInfo, false)); - error = mGralloc->getMapper()->freeBuffer(invalidHandle); + error = mGralloc->getMapper()->freeBuffer(const_cast<native_handle_t*>(clonedBufferHandle)); EXPECT_EQ(Error::BAD_BUFFER, error) << "freeBuffer with un-imported handle did not fail with BAD_BUFFER";