summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Erickson <marathon96@gmail.com>2011-07-19 00:48:39 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2011-07-19 10:09:25 (GMT)
commit66de2f784fe4419952ef6bfc7b1f7fb8b505a193 (patch)
treea4d2d8d549a1a5d41d9ae39070e516db799c8e1b
parenta70045cf662b8fb9104a22078401ee572e257d52 (diff)
downloadconnman-66de2f784fe4419952ef6bfc7b1f7fb8b505a193.zip
connman-66de2f784fe4419952ef6bfc7b1f7fb8b505a193.tar.gz
connman-66de2f784fe4419952ef6bfc7b1f7fb8b505a193.tar.bz2
service: clear ipconfig data and operations on free
Ensure ipconfig data and operations are cleared out when a service is freed. This is at least a partial fix and maybe a full fix for issues 21000 <http://bugs.meego.com/show_bug.cgi?id=21000> and 21285 <http://bugs.meego.com/show_bug.cgi?id=21285>.
-rw-r--r--src/service.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index 9a0dbef..792c504 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2970,11 +2970,15 @@ static void service_free(gpointer user_data)
connman_provider_unref(service->provider);
if (service->ipconfig_ipv4 != NULL) {
+ connman_ipconfig_set_ops(service->ipconfig_ipv4, NULL);
+ connman_ipconfig_set_data(service->ipconfig_ipv4, NULL);
connman_ipconfig_unref(service->ipconfig_ipv4);
service->ipconfig_ipv4 = NULL;
}
if (service->ipconfig_ipv6 != NULL) {
+ connman_ipconfig_set_ops(service->ipconfig_ipv6, NULL);
+ connman_ipconfig_set_data(service->ipconfig_ipv6, NULL);
connman_ipconfig_unref(service->ipconfig_ipv6);
service->ipconfig_ipv6 = NULL;
}