From 9f7c181d504dcee2436956f5cfcef547de6b55f4 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Thu, 23 Apr 2015 12:36:28 -0700 Subject: [PATCH] Make sure we initialize conn to NULL, because a routine we call may give an error and not touch conn, and then we get an error when trying to TALLOC_FREE it. https://bugzilla.samba.org/show_bug.cgi?id=11234 Signed-off-by: Richard Sharpe Reviewed-by: Jeremy Allison (cherry picked from commit 471744a32d37f187c87f9bfa6f860b69446b9afe) --- source3/utils/net_dns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/utils/net_dns.c b/source3/utils/net_dns.c index 9bbefdb..7a04459 100644 --- a/source3/utils/net_dns.c +++ b/source3/utils/net_dns.c @@ -210,7 +210,7 @@ int get_my_ip_address( struct sockaddr_storage **pp_ss ) DNS_ERROR do_gethostbyname(const char *server, const char *host) { - struct dns_connection *conn; + struct dns_connection *conn = NULL; struct dns_request *req, *resp; DNS_ERROR err; -- 2.1.4