diff --git a/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp b/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp index 608a4b0c4c..1bc7263048 100644 --- a/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp +++ b/sensors/aidl/vts/VtsAidlHalSensorsTargetTest.cpp @@ -978,7 +978,7 @@ void SensorsAidlTest::verifyRegisterDirectChannel( ASSERT_EQ(status.getExceptionCode(), error); ASSERT_EQ(channelHandle, -1); } - directChannelHandle = &channelHandle; + *directChannelHandle = channelHandle; } void SensorsAidlTest::verifyUnregisterDirectChannel(int32_t* channelHandle,