From: Richard Sharpe Date: Thu, 23 Apr 2015 19:36:28 +0000 (-0700) Subject: Make sure we initialize conn to NULL, because a routine we call may give an error... X-Git-Tag: samba-4.1.18~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e0df254611d2e310cdb563e70c21ddb7560a038;p=thirdparty%2Fsamba.git 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) --- diff --git a/source3/utils/net_dns.c b/source3/utils/net_dns.c index 9bbefdb8b1c..7a04459c2ce 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;