Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ba7c512 authored by John Reck's avatar John Reck
Browse files

Fix typo in FreeBufferNegative test

Wrong buffer was being free'd, triggering ASAN violations

Fixes: 278138497
Test: this
Change-Id: I7be7c85a55a58d01576324d2cd201e5a03e88283
parent aa8f76af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -677,7 +677,7 @@ TEST_P(GraphicsMapperHidlTest, FreeBufferNegative) {

    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";