mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Make sure the VehiclePropValue object is initialized
If MALLOC_ZERO_CONTENTS is false, the new created VehiclePropValue object maybe filled with dirty data, we should initialize it so that its status member can be initialized to zero to avoid timeout when car services get properties, such as property OBD2_LIVE_FRAME. Bug: 315728228 Test: hidl_test Change-Id: I530bc95a3074c917be853f55cd1736558b140da4 Signed-off-by: Liu, Kai1 <kai1.liu@intel.com>
This commit is contained in:
@@ -30,7 +30,7 @@ namespace V2_0 {
|
||||
|
||||
std::unique_ptr<VehiclePropValue> createVehiclePropValue(
|
||||
VehiclePropertyType type, size_t vecSize) {
|
||||
auto val = std::unique_ptr<VehiclePropValue>(new VehiclePropValue);
|
||||
auto val = std::unique_ptr<VehiclePropValue>(new VehiclePropValue());
|
||||
switch (type) {
|
||||
case VehiclePropertyType::INT32: // fall through
|
||||
case VehiclePropertyType::INT32_VEC: // fall through
|
||||
|
||||
Reference in New Issue
Block a user