If service settings cannot be loaded, then skip that service.
Thanks for Felipe Tonello for reporting the issue.
---
 plugins/wifi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index d0c8dff..75ccb14 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -384,6 +384,8 @@ static int get_hidden_connections(int max_ssids,
                        continue;
 
                keyfile = connman_storage_load_service(services[i]);
+               if (keyfile == NULL)
+                       continue;
 
                value = g_key_file_get_boolean(keyfile,
                                        services[i], "Hidden", NULL);
@@ -825,6 +827,8 @@ static int get_latest_connections(int max_ssids,
                        continue;
 
                keyfile = connman_storage_load_service(services[i]);
+               if (keyfile == NULL)
+                       continue;
 
                str = g_key_file_get_string(keyfile,
                                        services[i], "Favorite", NULL);
-- 
1.7.11.4

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to