summaryrefslogtreecommitdiff
path: root/src/wispr.c
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2011-10-17 16:51:32 +0300
committerSamuel Ortiz <sameo@linux.intel.com>2011-10-21 00:26:26 +0200
commitea36c339dea11aeaf065df5f95a0d5bb6bcdf0e4 (patch)
treef825de44ebfd2f1e9cb66f03f27b4923aef58b3e /src/wispr.c
parent05f526ba37fee56db7319e5dd3c2e9d6b5d88ea4 (diff)
downloadconnman-ea36c339dea11aeaf065df5f95a0d5bb6bcdf0e4.tar.gz
connman-ea36c339dea11aeaf065df5f95a0d5bb6bcdf0e4.tar.bz2
connman-ea36c339dea11aeaf065df5f95a0d5bb6bcdf0e4.zip
wispr: Reference count service properly according to contexts
Diffstat (limited to 'src/wispr.c')
-rw-r--r--src/wispr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wispr.c b/src/wispr.c
index d97aaebd..0e05f9d5 100644
--- a/src/wispr.c
+++ b/src/wispr.c
@@ -120,6 +120,8 @@ static void free_connman_wispr_portal_context(struct connman_wispr_portal_contex
if (wp_context == NULL)
return;
+ connman_service_unref(wp_context->service);
+
if (wp_context->token > 0)
connman_proxy_lookup_cancel(wp_context->token);
@@ -721,6 +723,8 @@ int __connman_wispr_start(struct connman_service *service,
if (wp_context == NULL)
return -ENOMEM;
+ connman_service_ref(service);
+
wp_context->service = service;
wp_context->type = type;