Merge branch 'master' of /home/nchip/public_html/qemu into garage-push
[qemu] / aio.c
diff --git a/aio.c b/aio.c
index 200320c..11fbb6c 100644 (file)
--- a/aio.c
+++ b/aio.c
@@ -44,7 +44,8 @@ static AioHandler *find_aio_handler(int fd)
 
     LIST_FOREACH(node, &aio_handlers, node) {
         if (node->fd == fd)
-            return node;
+            if (!node->deleted)
+                return node;
     }
 
     return NULL;