Skip to contentSkip to conversation

[5470] Make sure to initialize fd_sets in aio.c

Qemu-devel Anthony Liguori 1 participant 1 message Oct 12, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5470

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5470
Author:   aliguori
Date:     2008-10-12 21:19:57 +0000 (Sun, 12 Oct 2008)

Log Message:
-----------
Make sure to initialize fd_sets in aio.c

This was spotted by valgrind.

Modified Paths:
--------------
trunk/aio.c

Modified: trunk/aio.c
===================================================================

aio.c +3 -0
@@ -126,6 +126,9 @@
 
         walking_handlers = 1;
 
+        FD_ZERO(&rdfds);
+        FD_ZERO(&wrfds);
+
         /* fill fd sets */
         LIST_FOREACH(node, &aio_handlers, node) {
             /* If there aren't pending AIO operations, don't invoke callbacks.