Service may be refcount two times when add_gateway for both ipv4 and
ipv6, but we only unref sercie once in connman_connection_gateway_remove
we can fix this by refcount the service only when service is not in
gateway_hash
---
src/connection.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/connection.c b/src/connection.c
index 54f2b74..c392d9d 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -227,9 +227,9 @@ static struct gateway_data *add_gateway(struct
connman_service *service,
data->ipv4_gateway = old->ipv4_gateway;
old->ipv4_gateway = NULL;
}
- }
+ } else
+ connman_service_ref(service);
- connman_service_ref(service);
g_hash_table_replace(gateway_hash, service, data);
return data;
--
1.7.2.2
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman