summaryrefslogtreecommitdiff
path: root/neuralnetworks/aidl/vts/functional/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'neuralnetworks/aidl/vts/functional/Utils.cpp')
-rw-r--r--neuralnetworks/aidl/vts/functional/Utils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/neuralnetworks/aidl/vts/functional/Utils.cpp b/neuralnetworks/aidl/vts/functional/Utils.cpp
index 14a496a303..3c7f5f797d 100644
--- a/neuralnetworks/aidl/vts/functional/Utils.cpp
+++ b/neuralnetworks/aidl/vts/functional/Utils.cpp
@@ -135,7 +135,8 @@ void TestBlobAHWB::initialize(uint32_t size) {
ASSERT_EQ(AHardwareBuffer_allocate(&desc, &mAhwb), 0);
ASSERT_NE(mAhwb, nullptr);
- const auto sharedMemory = nn::createSharedMemoryFromAHWB(*mAhwb).value();
+ const auto sharedMemory =
+ nn::createSharedMemoryFromAHWB(mAhwb, /*takeOwnership=*/false).value();
mMapping = nn::map(sharedMemory).value();
mPtr = static_cast<uint8_t*>(std::get<void*>(mMapping.pointer));
CHECK_NE(mPtr, nullptr);