aboutsummaryrefslogtreecommitdiff
path: root/aio-win32.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-09-12 12:08:49 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-09-22 11:38:50 +0100
commit6698c5bed290f3852c9f200d197b5d99211bc3cd (patch)
tree8babc2a6dfbb58a128eacab91ad5a24567b50825 /aio-win32.c
parentd735b620b58f2fdfddc8e641e9feac3c9671a49d (diff)
aio-win32: fix uninitialized use of have_select_revents
Always initialize it with the return value of aio_prepare. Reported-by: TeLeMan <geleman@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'aio-win32.c')
-rw-r--r--aio-win32.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/aio-win32.c b/aio-win32.c
index 61e3d2ddfe..7daeae18f1 100644
--- a/aio-win32.c
+++ b/aio-win32.c
@@ -283,9 +283,9 @@ bool aio_poll(AioContext *ctx, bool blocking)
int count;
int timeout;
- if (aio_prepare(ctx)) {
+ have_select_revents = aio_prepare(ctx);
+ if (have_select_revents) {
blocking = false;
- have_select_revents = true;
}
was_dispatching = ctx->dispatching;