l = g_slist_find_custom(mesh_apps, net_uuid,
__mesh_compare_network_uuid);
+ if (!l) {
+ g_free(net_uuid);
+ return NULL;
+ }
app = l->data;
memset(&ev, 0, sizeof(ev));
uint8_t *net_uuid;
const char *dbus_path;
GSList *l;
- meshcfg_app *app;
+ meshcfg_app *app = NULL;
dbus_path = l_dbus_message_get_path(msg);
net_uuid = __mesh_get_net_uuid_from_path(dbus_path, true,
l = g_slist_find_custom(mesh_apps, net_uuid,
__mesh_compare_network_uuid);
- app = l->data;
+
+ if (l) {
+ app = l->data;
+ } else {
+ ERR("Mesh: app not found");
+ }
+
memset(&ev, 0, sizeof(ev));
memcpy(ev.net_uuid, net_uuid, 16);
struct hal_ev_mesh_provision_finished ev;
memset(&ev, 0, sizeof(ev));
- memcpy(ev.net_uuid, app->uuid, 16);
+
+ if (app)
+ memcpy(ev.net_uuid, app->uuid, 16);
+
ev.status = BT_STATUS_FAIL;
ev.reason = BT_HAL_MESH_PROV_ERR_INTERNAL;
if (mesh_event_cb)
meshcfg_app *app;
l = g_slist_find_custom(mesh_apps, net_uuid,
__mesh_compare_network_uuid);
+ if (!l)
+ return;
app = l->data;
if (app->scan_timer_id > 0) {
l_dbus_message_set_arguments(msg, "qy",
node_info->unicast, node_info->num_elements);
INFO("Mesh: Delete Remote Node Setup params passed");
- g_free(node_info);
}
static void __bt_hal_mesh_delete_node_reply(