From: Bert Hubert Date: Mon, 29 Oct 2012 14:32:55 +0000 (+0000) Subject: I'm 99% sure valgrind was complaining incorrectly, but this should fix it in any... X-Git-Tag: auth-3.2-rc1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a29279d464374635f2ce745228227542d9f7734f;p=pdns I'm 99% sure valgrind was complaining incorrectly, but this should fix it in any case. git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2829 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/nameserver.cc b/pdns/nameserver.cc index 3d31c099d..10eb1e384 100644 --- a/pdns/nameserver.cc +++ b/pdns/nameserver.cc @@ -215,7 +215,8 @@ void UDPNameserver::send(DNSPacket *p) struct cmsghdr *cmsg; struct iovec iov; char cbuf[256]; - + memset(cbuf, 0, sizeof(cbuf)); // not strictly necessary, but valgrind triggers on this sometimes otherwise + /* Set up iov and msgh structures. */ memset(&msgh, 0, sizeof(struct msghdr)); iov.iov_base = (void*)buffer.c_str();