080bbf
From e3f491fde52c3c7f31b0137125cb0ab1d5721f87 Mon Sep 17 00:00:00 2001
080bbf
From: Andreas Schneider <asn@samba.org>
080bbf
Date: Thu, 17 May 2018 11:53:18 +0200
080bbf
Subject: [PATCH] s3:utils: Do not segfault on error in DoDNSUpdate()
080bbf
080bbf
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13440
080bbf
080bbf
Signed-off-by: Andreas Schneider <asn@samba.org>
080bbf
Reviewed-by: Volker Lendecke <vl@samba.org>
080bbf
080bbf
(cherry picked from commit cdd98aa1e2116fb97e16718d115ee883fe1bc8ba)
080bbf
---
080bbf
 source3/utils/net_dns.c | 1 +
080bbf
 1 file changed, 1 insertion(+)
080bbf
080bbf
diff --git a/source3/utils/net_dns.c b/source3/utils/net_dns.c
080bbf
index d972a5d4bad..9ee856c0059 100644
080bbf
--- a/source3/utils/net_dns.c
080bbf
+++ b/source3/utils/net_dns.c
080bbf
@@ -75,6 +75,7 @@ DNS_ERROR DoDNSUpdate(char *pszServerName,
080bbf
 
080bbf
 		if (!ERR_DNS_IS_OK(err)) {
080bbf
 			DEBUG(3,("DoDNSUpdate: failed to probe DNS\n"));
080bbf
+			goto error;
080bbf
 		}
080bbf
 
080bbf
 		if ((dns_response_code(resp->flags) == DNS_NO_ERROR) &&
080bbf
-- 
080bbf
2.16.3
080bbf