aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block/blkdebug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 95b72445a7..69b330eced 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -453,6 +453,10 @@ static void error_callback_bh(void *opaque)
static void blkdebug_aio_cancel(BlockDriverAIOCB *blockacb)
{
BlkdebugAIOCB *acb = container_of(blockacb, BlkdebugAIOCB, common);
+ if (acb->bh) {
+ qemu_bh_delete(acb->bh);
+ acb->bh = NULL;
+ }
qemu_aio_release(acb);
}