aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-11-14 17:50:54 +0100
committerKevin Wolf <kwolf@redhat.com>2011-12-15 12:40:08 +0100
commit3f3aace83046a6740d4e6f92811d333c6741db00 (patch)
tree578d665c6d1a62ddcdf360d9a828c82c5b4a41c8 /block.c
parentb9b2008bbff49e2714491a95109e1189e54a6491 (diff)
block: avoid useless checks on acb->bh
Coverity is confused by this "if" and reports leaks on acb->bh. The bottom half is always deleted before releasing the AIOCB, in either bdrv_aio_cancel_em or bdrv_aio_bh_cb. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block.c b/block.c
index 16a4c422f4..3f072f6274 100644
--- a/block.c
+++ b/block.c
@@ -3077,9 +3077,7 @@ static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs,
acb->is_write = is_write;
acb->qiov = qiov;
acb->bounce = qemu_blockalign(bs, qiov->size);
-
- if (!acb->bh)
- acb->bh = qemu_bh_new(bdrv_aio_bh_cb, acb);
+ acb->bh = qemu_bh_new(bdrv_aio_bh_cb, acb);
if (is_write) {
qemu_iovec_to_buffer(acb->qiov, acb->bounce);