From: Samuel Ortiz Date: Fri, 17 Dec 2010 17:38:24 +0000 (+0100) Subject: service: Set ipconfig structure to NULL if ipconfig_disable fails X-Git-Tag: 2.0_alpha~1985 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=870bc7d7e5ca5043ac801b5d3603fcdfc08a0862;p=framework%2Fconnectivity%2Fconnman.git service: Set ipconfig structure to NULL if ipconfig_disable fails --- diff --git a/src/service.c b/src/service.c index aeaf170..6ca80cd 100644 --- a/src/service.c +++ b/src/service.c @@ -3395,10 +3395,10 @@ int __connman_service_disconnect(struct connman_service *service) __connman_ipconfig_clear_address(service->ipconfig_ipv4); __connman_ipconfig_clear_address(service->ipconfig_ipv6); - if (!__connman_ipconfig_disable(service->ipconfig_ipv4)) + if (__connman_ipconfig_disable(service->ipconfig_ipv4) < 0) service->ipconfig_ipv4 = NULL; - if (!__connman_ipconfig_disable(service->ipconfig_ipv6)) + if (__connman_ipconfig_disable(service->ipconfig_ipv6) < 0) service->ipconfig_ipv6 = NULL; __connman_stats_service_unregister(service);