[dovecot-cvs] dovecot/src/lib ioloop-epoll.c,1.11.2.3,1.11.2.4

tss at dovecot.org tss at dovecot.org
Fri Oct 13 23:12:54 UTC 2006


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv4943

Modified Files:
      Tag: branch_1_0
	ioloop-epoll.c 
Log Message:
Don't pass uninitialized data in epoll data struct's union to kernel.
Doesn't matter that much, but keeps valgrind happy.



Index: ioloop-epoll.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop-epoll.c,v
retrieving revision 1.11.2.3
retrieving revision 1.11.2.4
diff -u -d -r1.11.2.3 -r1.11.2.4
--- ioloop-epoll.c	16 Aug 2006 21:33:38 -0000	1.11.2.3
+++ ioloop-epoll.c	13 Oct 2006 22:12:51 -0000	1.11.2.4
@@ -94,6 +94,7 @@
 
 	first = ioloop_iolist_add(*list, io);
 
+	memset(&event, 0, sizeof(event));
 	event.data.ptr = *list;
 	event.events = epoll_event_mask(*list);
 
@@ -125,6 +126,7 @@
 	list = array_idx_modifyable(&ctx->fd_index, io->fd);
 	last = ioloop_iolist_del(*list, io);
 
+	memset(&event, 0, sizeof(event));
 	event.data.ptr = *list;
 	event.events = epoll_event_mask(*list);
 



More information about the dovecot-cvs mailing list