From 0161f3af0f8e44ad9a6f9f9d867c0dfcb8bb45c3 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Thu, 24 Feb 2011 23:59:09 +0100 Subject: network: Fix nameserver setting routine --- src/provider.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/provider.c') diff --git a/src/provider.c b/src/provider.c index 3aa35371..4061af08 100644 --- a/src/provider.c +++ b/src/provider.c @@ -861,11 +861,13 @@ int connman_provider_set_nameservers(struct connman_provider *provider, if (nameservers != NULL) nameservers_array = g_strsplit(nameservers, " ", 0); - for (i = 0; nameservers_array[i] == NULL; i++) { + for (i = 0; nameservers_array[i] != NULL; i++) { __connman_service_nameserver_append(provider->vpn_service, nameservers_array[i]); } + g_strfreev(nameservers_array); + return 0; } -- cgit v1.2.3