]> granicus.if.org Git - pdns/commitdiff
I'm 99% sure valgrind was complaining incorrectly, but this should fix it in any...
authorBert Hubert <bert.hubert@netherlabs.nl>
Mon, 29 Oct 2012 14:32:55 +0000 (14:32 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Mon, 29 Oct 2012 14:32:55 +0000 (14:32 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2829 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/nameserver.cc

index 3d31c099df5f9f6149d6dfaa4f03329a9f9e6ea1..10eb1e384399e1eba508d45542f41f56cf9ab939 100644 (file)
@@ -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();