From 35c9e8d5321b6451fb74f8e7231a690c940a6e69 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Wed, 6 May 2015 20:49:57 +0200
Subject: [PATCH] dns: Fix falling back in the resolv.conf methods

---
 src/dns-manager/nm-dns-manager.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
index 2f8ceab..eade2a0 100644
--- a/src/dns-manager/nm-dns-manager.c
+++ b/src/dns-manager/nm-dns-manager.c
@@ -782,13 +782,16 @@ update_dns (NMDnsManager *self,
 
 #ifdef NETCONFIG_PATH
 	if (success == FALSE) {
+		g_clear_error (error);
 		success = dispatch_netconfig (searches, nameservers,
 		                              nis_domain, nis_servers, error);
 	}
 #endif
 
-	if (success == FALSE)
+	if (success == FALSE) {
+		g_clear_error (error);
 		success = update_resolv_conf (searches, nameservers, error);
+	}
 
 	/* signal that resolv.conf was changed */
 	if (success)
-- 
2.4.0
 
