}
/* Clear scan list */
- g_list_free_full(service->scanned_mesh_network, _on_scan_result_destroy);
+ if (service->scanned_mesh_network)
+ g_list_free_full(service->scanned_mesh_network, _on_scan_result_destroy);
service->scanned_mesh_network = NULL;
/* Clear connected peers list */
- g_list_free_full(service->connected_mesh_peers, _on_peer_info_destroy);
+ if (service->connected_mesh_peers)
+ g_list_free_full(service->connected_mesh_peers, _on_peer_info_destroy);
service->connected_mesh_peers = NULL;
+ /* Clear mesh path list */
+ if (service->mpath_list)
+ g_list_free_full(service->mpath_list, _on_mpath_list_destroy);
+ service->mpath_list = NULL;
+
+ /* Clear mesh station list */
+ if (service->station_list)
+ g_list_free_full(service->station_list, _on_station_list_destroy);
+ service->station_list = NULL;
+
g_free(service->interface_info);
service->interface_info = NULL;
}