From 4dbacf6bbc313e711ae43cf6281acfd732595c69 Mon Sep 17 00:00:00 2001 From: Mark Michelson Date: Tue, 1 Apr 2008 17:23:19 +0000 Subject: [PATCH] Merged revisions 112138 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r112138 | mmichelson | 2008-04-01 12:21:21 -0500 (Tue, 01 Apr 2008) | 10 lines Initialize the __res_state structure used for dns purposes to all 0's prior to using it. This is due to valgrind's complaints on issue #12284 as well as an excerpt found in "Description" portion of the online man page found here: http://www.iti.cs.tu-bs.de/cgi-bin/UNIXhelp/man-cgi?res_nquery+3RESOLV (pertains to issue #12284 but does not necessarily close it) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112148 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/dns.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main/dns.c b/main/dns.c index f6dc407dd2..4884406cb4 100644 --- a/main/dns.c +++ b/main/dns.c @@ -263,6 +263,7 @@ int ast_search_dns(void *context, int res, ret = -1; #ifdef HAVE_RES_NINIT + memset(&dnsstate, 0, sizeof(dnsstate)); res_ninit(&dnsstate); res = res_nsearch(&dnsstate, dname, class, type, answer, sizeof(answer)); #else