From: Grant Erickson Date: Tue, 19 Jul 2011 00:48:39 +0000 (-0700) Subject: service: clear ipconfig data and operations on free X-Git-Tag: 2.0_alpha~1313 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fconnectivity%2Fconnman.git;a=commitdiff_plain;h=66de2f784fe4419952ef6bfc7b1f7fb8b505a193 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 and 21285 . --- 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; }