[PATCH memleak resend v2 2/2] Make calls to __connman_ipconfig_disable() consistent.

Jukka Rissanen jukka.rissanen at nokia.com
Mon Jan 3 01:42:27 PST 2011


---
 src/service.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/service.c b/src/service.c
index e58c08f..6b4ede8 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2233,11 +2233,11 @@ static gboolean connect_timeout(gpointer user_data)
 		__connman_network_disconnect(service->network);
 
 	if (service->ipconfig_ipv4)
-		if (!__connman_ipconfig_disable(service->ipconfig_ipv4))
+		if (__connman_ipconfig_disable(service->ipconfig_ipv4) == 0)
 			service->ipconfig_ipv4 = NULL;
 
 	if (service->ipconfig_ipv6)
-		if (!__connman_ipconfig_disable(service->ipconfig_ipv6))
+		if (__connman_ipconfig_disable(service->ipconfig_ipv6) == 0)
 			service->ipconfig_ipv6 = NULL;
 
 	__connman_stats_service_unregister(service);
@@ -3352,13 +3352,13 @@ int __connman_service_connect(struct connman_service *service)
 	if (err < 0) {
 		if (err != -EINPROGRESS) {
 			if (service->ipconfig_ipv4)
-				if (!__connman_ipconfig_disable(
-						    service->ipconfig_ipv4))
+				if (__connman_ipconfig_disable(
+						service->ipconfig_ipv4) == 0)
 					service->ipconfig_ipv4 = NULL;
 
 			if (service->ipconfig_ipv6)
-				if (!__connman_ipconfig_disable(
-						    service->ipconfig_ipv6))
+				if (__connman_ipconfig_disable(
+						service->ipconfig_ipv6) == 0)
 					service->ipconfig_ipv6 = NULL;
 
 			__connman_stats_service_unregister(service);
-- 
1.7.0.4




More information about the connman mailing list