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>
This commit is contained in:
parent
b9b2008bbf
commit
3f3aace830
4
block.c
4
block.c
@ -3077,9 +3077,7 @@ static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs,
|
|||||||
acb->is_write = is_write;
|
acb->is_write = is_write;
|
||||||
acb->qiov = qiov;
|
acb->qiov = qiov;
|
||||||
acb->bounce = qemu_blockalign(bs, qiov->size);
|
acb->bounce = qemu_blockalign(bs, qiov->size);
|
||||||
|
acb->bh = qemu_bh_new(bdrv_aio_bh_cb, acb);
|
||||||
if (!acb->bh)
|
|
||||||
acb->bh = qemu_bh_new(bdrv_aio_bh_cb, acb);
|
|
||||||
|
|
||||||
if (is_write) {
|
if (is_write) {
|
||||||
qemu_iovec_to_buffer(acb->qiov, acb->bounce);
|
qemu_iovec_to_buffer(acb->qiov, acb->bounce);
|
||||||
|
Loading…
Reference in New Issue
Block a user