connman_device_remove_network() might be called with only
1 remaining network available. In this case the service
will be destroyed by the hash table remove call, therefore
the service pointer is bogus.
---
src/device.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/device.c b/src/device.c
index e5bd84d..f0e5b37 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1119,6 +1119,7 @@ int connman_device_remove_network(struct connman_device
*device,
identifier = connman_network_get_identifier(network);
g_hash_table_remove(device->networks, identifier);
+ service = __connman_service_lookup_by_identifier(identifier);
if (service != NULL)
__connman_service_reset_from_networks(service,
device->networks);
--
1.7.4
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman