[sheepdog] [PATCH 3/6] lib/event: initialize variable

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed Sep 19 06:25:42 CEST 2012


This fixes a valgrind error on debian wheezy i686.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 lib/event.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/event.c b/lib/event.c
index a1a0b38..2154a56 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -107,6 +107,7 @@ int register_event(int fd, event_handler_t h, void *data)
 	ei->handler = h;
 	ei->data = data;
 
+	memset(&ev, 0, sizeof(ev));
 	ev.events = EPOLLIN;
 	ev.data.ptr = ei;
 
-- 
1.7.2.5




More information about the sheepdog mailing list