From 55301657012527edac5f295d859722aba6a88fbe Mon Sep 17 00:00:00 2001
From: elliotkendall <elliotkendall@gmail.com>
Date: Fri, 6 Jun 2014 12:27:08 -0700
Subject: [PATCH] Zero out epoll_event struct before using it - prevents
 valgrind warnings

---
 fanout.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fanout.c b/fanout.c
index 9af474f..a686ccb 100644
--- a/fanout.c
+++ b/fanout.c
@@ -343,6 +343,7 @@ xit\n");
     struct epoll_event fds[nfds];
 
     for (nfds = 0, runp = ai; runp != NULL; runp = runp->ai_next)  {
+        memset(&fds[nfds], 0, sizeof(struct epoll_event));
         fds[nfds].data.fd = socket (runp->ai_family, runp->ai_socktype, runp->ai_protocol);
         if (fds[nfds].data.fd == -1) {
             fanout_error ("ERROR opening socket");
-- 
GitLab