[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/14] block: avoid useless checks on acb->bh
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 06/14] block: avoid useless checks on acb->bh |
Date: |
Thu, 15 Dec 2011 15:09:21 +0100 |
From: Paolo Bonzini <address@hidden>
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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/block.c b/block.c
index 16a4c42..3f072f6 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);
--
1.7.6.4
- [Qemu-devel] [PULL 00/14] Block patches, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 01/14] block: bdrv_aio_* do not return NULL, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 02/14] block: simplify failure handling for bdrv_aio_multiwrite, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 06/14] block: avoid useless checks on acb->bh,
Kevin Wolf <=
- [Qemu-devel] [PATCH 03/14] block: qemu_aio_get does not return NULL, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 07/14] block/qcow2.c: call qcow2_free_snapshots in the function of qcow2_close, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 04/14] dma: the passed io_func does not return NULL, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 08/14] rbd: always set out parameter in qemu_rbd_snap_list, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 05/14] block: dma_bdrv_* does not return NULL, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 11/14] qcow2: Allow >4 GB VM state, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 09/14] qemu-img rebase: Fix for undersized backing files, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 13/14] block/cow: Return real error code, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 14/14] qiov: prevent double free or use-after-free, Kevin Wolf, 2011/12/15
- [Qemu-devel] [PATCH 10/14] Documentation: Add qemu-img -t parameter in man page, Kevin Wolf, 2011/12/15