Fix the svace issues 23/239223/1 submit/tizen/20200724.011403
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 23 Jul 2020 00:53:17 +0000 (09:53 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 23 Jul 2020 00:53:17 +0000 (09:53 +0900)
Change-Id: Ic678d8d880e0473d738f83dd6d4b21f379a9bd9c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-oal/bluez_hal/src/bt-hal-mesh-dbus-handler.c
bt-service/services/mesh/bt-service-mesh-config-client.c

index 99163ad..81ca6d5 100644 (file)
@@ -2289,6 +2289,8 @@ bt_status_t _bt_hal_mesh_send_key_config_message(
                }
                l1 = g_slist_find_custom(app->elements,
                        GUINT_TO_POINTER(src_elem_idx), __compare_element_index);
+               if (!l1)
+                       return BT_STATUS_FAIL;
                elem = l1->data;
 
                req = l_new(struct key_config_request, 1);
index a9bfac4..b0c352c 100644 (file)
@@ -1150,7 +1150,10 @@ void _bt_mesh_config_client_devkey_msg_handler(
                param.sub_addr = addr;
                param.model = mod_id;
                BT_INFO("Subscr Addr\t%4.4x\n", addr);
-               __mesh_handle_model_subscription_event(result, &param, cmd);
+
+               if (cmd)
+                       __mesh_handle_model_subscription_event(result, &param, cmd);
+
                break;
        }
        case MESH_OPCODE_CONFIG_DEFAULT_TTL_STATUS: {