From b1c2d07e4e2d0b2b80f3e6ac5043f9122326360d Mon Sep 17 00:00:00 2001 From: Gabriel Biren Date: Sat, 15 Oct 2022 00:04:49 +0000 Subject: [PATCH] Add a null pointer check for wifi_chip in configureChipToSupportIfaceTypeInternal. Bug: 253411345 Test: atest VtsHalHostapdTargetTest Change-Id: Ieb6de7311de8d98742e302b35196bee7fa7661ed --- wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp index e6e61cf8b7..02f8209e5b 100644 --- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp +++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp @@ -66,7 +66,7 @@ bool findAnyModeSupportingIfaceType( bool configureChipToSupportIfaceTypeInternal(const sp& wifi_chip, IfaceType type, ChipModeId* configured_mode_id) { - if (!configured_mode_id) { + if (!configured_mode_id || !wifi_chip.get()) { return false; } const auto& status_and_modes = HIDL_INVOKE(wifi_chip, getAvailableModes);