Fix ownership of objects returned by VintfObject::Get*
VintfObject::Get* returns a pointer that clients
can own. Client should not store this pointer
but call VintfObject::Get each time.
Make the change in VTS to reflect this change.
Test: builds
Bug: 65166415
Change-Id: I88e91833ff4523ae28b09fa20a68cd26f96d0723
diff --git a/iface_fuzzer/ProtoFuzzerRunner.cpp b/iface_fuzzer/ProtoFuzzerRunner.cpp
index dddefb9..21d8831 100644
--- a/iface_fuzzer/ProtoFuzzerRunner.cpp
+++ b/iface_fuzzer/ProtoFuzzerRunner.cpp
@@ -45,12 +45,12 @@
}
static string GetServiceName(const CompSpec &comp_spec) {
- static const HalManifest *vendor_manifest =
- ::android::vintf::VintfObject::GetDeviceHalManifest();
string hal_name = comp_spec.package();
string iface_name = comp_spec.component_name();
- auto instance_names = vendor_manifest->getInstances(hal_name, iface_name);
+ auto instance_names =
+ ::android::vintf::VintfObject::GetDeviceHalManifest()->getInstances(
+ hal_name, iface_name);
if (instance_names.empty()) {
cerr << "HAL service name not available in VINTF." << endl;
exit(1);