The network probing code path already calls profile_add_network, calling
it again from the oFono network probing hook leads to wrong reference
counting.
Fixes BMC#9985
static int network_probe(struct connman_network *network)
{
- create_service(network);
return 0;
}
hash_path = connman_network_get_string(network, "Path");
if (hash_path == NULL)
goto error;
+
+ create_service(network);
+
connman_network_ref(network);
g_hash_table_insert(network_hash, (char *)hash_path, network);