summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-07-30 14:02:44 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-02 17:16:11 (GMT)
commitde41f828cf9decef412165c2895cb6ddc73be455 (patch)
treeb4d9723d41531e8f498bc1aac860cde59fb80b3a
parent4fc2968ea3c3237bbb78bcd78391980b0727f06a (diff)
downloadconnman-de41f828cf9decef412165c2895cb6ddc73be455.zip
connman-de41f828cf9decef412165c2895cb6ddc73be455.tar.gz
connman-de41f828cf9decef412165c2895cb6ddc73be455.tar.bz2
Unref openconnect provider on disconnect and remove
-rw-r--r--plugins/openconnect.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/openconnect.c b/plugins/openconnect.c
index 891aa87..c860f27 100644
--- a/plugins/openconnect.c
+++ b/plugins/openconnect.c
@@ -382,6 +382,8 @@ static int oc_disconnect(struct connman_provider *provider)
data->watch = 0;
connman_task_stop(data->task);
+ connman_provider_unref(provider);
+
return 0;
}
@@ -399,6 +401,8 @@ static int oc_remove(struct connman_provider *provider)
data->watch = 0;
connman_task_stop(data->task);
+ connman_provider_unref(provider);
+
g_usleep(G_USEC_PER_SEC);
kill_tun(data->if_name);
return 0;