]> git.proxmox.com Git - qemu.git/blobdiff - async.c
Version 0.15.1
[qemu.git] / async.c
diff --git a/async.c b/async.c
index 57ac3a818032811ecccf2e3adbec63b4afc71596..fd313dffb7acc40bd79acfab3dc28e06c49f8596 100644 (file)
--- a/async.c
+++ b/async.c
@@ -137,11 +137,12 @@ QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)
 
 int qemu_bh_poll(void)
 {
-    QEMUBH *bh, **bhp;
+    QEMUBH *bh, **bhp, *next;
     int ret;
 
     ret = 0;
-    for (bh = async_context->first_bh; bh; bh = bh->next) {
+    for (bh = async_context->first_bh; bh; bh = next) {
+        next = bh->next;
         if (!bh->deleted && bh->scheduled) {
             bh->scheduled = 0;
             if (!bh->idle)