The reference counting problems were clearly seen with VPN service.
---
src/connection.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/connection.c b/src/connection.c
index 4f3b3f8..38269d6 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -227,6 +227,7 @@ static struct gateway_data *add_gateway(struct
connman_service *service,
}
}
+ connman_service_ref(service);
g_hash_table_replace(gateway_hash, service, data);
return data;
@@ -614,9 +615,10 @@ void __connman_connection_gateway_remove(struct
connman_service *service,
&& do_ipv4 == TRUE) ||
(data->ipv6_gateway != NULL && data->ipv4_gateway == NULL
&& do_ipv6 == TRUE)
- )
+ ) {
+ connman_service_unref(service);
g_hash_table_remove(gateway_hash, service);
- else
+ } else
DBG("Not yet removing gw ipv4 %p/%d ipv6 %p/%d",
data->ipv4_gateway, do_ipv4,
data->ipv6_gateway, do_ipv6);
--
1.7.1
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman