Fix SVACE issue 47/318747/1 accepted/tizen/unified/20250226.044804 accepted/tizen/unified/x/20250226.132026
authorAnuj Jain <anuj01.jain@samsung.com>
Thu, 23 Jan 2025 06:27:56 +0000 (11:57 +0530)
committerAnuj Jain <anuj01.jain@samsung.com>
Thu, 23 Jan 2025 06:27:56 +0000 (11:57 +0530)
This patch fixes SVACE issue: 224708

Change-Id: I0d291117a4f37bec0839a6961db47fae1e962629
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
bt-service/services/device/bt-service-bonded-device.c

index 136afb81c1a410da7f5463ee2ef7c1d0ac521d01..b7e411a8130207150afdea9e64533c42f33380d0 100644 (file)
@@ -215,6 +215,11 @@ static void __bt_service_fetch_dev_info_for_bonded_addr_list(void)
        BT_INFO("bonded_list_index: %d", bonded_list_index);
        for (; bonded_list_index < count; bonded_list_index++) {
                GSList *l = g_slist_nth(bonded_addr_list, bonded_list_index);
+               if (!l) {
+                       BT_ERR("l is NULL unexpectedly, need to check");
+                       continue;
+               }
+
                bluetooth_device_address_t *dev_addr = l->data;
 
                if (!dev_addr)