---
src/wispr.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/wispr.c b/src/wispr.c
index 1f470f7..a0d491a 100644
--- a/src/wispr.c
+++ b/src/wispr.c
@@ -721,6 +721,8 @@ int __connman_wispr_start(struct connman_service *service,
wp_context->service = service;
wp_context->type = type;
+ connman_service_ref(service);
+
if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
wispr_portal->ipv4_context = wp_context;
else
@@ -745,7 +747,9 @@ void __connman_wispr_stop(struct connman_service *service)
if (index < 0)
return;
- g_hash_table_remove(wispr_portal_list, GINT_TO_POINTER(index));
+ if (g_hash_table_remove(wispr_portal_list,
+ GINT_TO_POINTER(index)) == TRUE)
+ connman_service_unref(service);
}
int __connman_wispr_init(void)
--
1.7.1
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman