From a29279d464374635f2ce745228227542d9f7734f Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Mon, 29 Oct 2012 14:32:55 +0000 Subject: [PATCH] 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 --- pdns/nameserver.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- 2.40.0