diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2012-01-18 16:46:34 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-01-20 01:42:07 +0100 |
commit | 3a2ffc682f7517b06fdb16563a09a57946ce7811 (patch) | |
tree | 42306b7e08940ca2bacb7c97668fddd73cd735d8 /src/provider.c | |
parent | 9b63518d2fa44052fb5de9d9d671320934fe0738 (diff) | |
download | connman-3a2ffc682f7517b06fdb16563a09a57946ce7811.tar.gz connman-3a2ffc682f7517b06fdb16563a09a57946ce7811.tar.bz2 connman-3a2ffc682f7517b06fdb16563a09a57946ce7811.zip |
service: Refactor the service unref function
Diffstat (limited to 'src/provider.c')
-rw-r--r-- | src/provider.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/provider.c b/src/provider.c index 92158e2c..0d9139c3 100644 --- a/src/provider.c +++ b/src/provider.c @@ -456,12 +456,11 @@ int connman_provider_indicate_error(struct connman_provider *provider, static void unregister_provider(gpointer data) { struct connman_provider *provider = data; - struct connman_service *service = provider->vpn_service; - DBG("provider %p", provider); + DBG("provider %p service %p", provider, provider->vpn_service); + connman_service_unref(provider->vpn_service); provider->vpn_service = NULL; - __connman_service_put(service); connman_provider_unref(provider); } @@ -661,7 +660,7 @@ int __connman_provider_create_and_connect(DBusMessage *msg) return 0; failed: - __connman_service_put(provider->vpn_service); + connman_service_unref(provider->vpn_service); provider->vpn_service = NULL; unref: |