diff options
-rw-r--r-- | block/quorum.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/quorum.c b/block/quorum.c index 093382e..41c4249 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -138,7 +138,9 @@ static void quorum_aio_cancel(BlockDriverAIOCB *blockacb) /* cancel all callbacks */ for (i = 0; i < s->num_children; i++) { - bdrv_aio_cancel(acb->qcrs[i].aiocb); + if (acb->qcrs[i].aiocb) { + bdrv_aio_cancel(acb->qcrs[i].aiocb); + } } g_free(acb->qcrs); |