Skip to content

Commit

Permalink
I'm 99% sure valgrind was complaining incorrectly, but this should fi…
Browse files Browse the repository at this point in the history
…x it in any case.

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2829 d19b8d6e-7fed-0310-83ef-9ca221ded41b
  • Loading branch information
ahupowerdns committed Oct 29, 2012
1 parent d995f00 commit a29279d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pdns/nameserver.cc
Expand Up @@ -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();
Expand Down

0 comments on commit a29279d

Please sign in to comment.