From 8c215a9fbdfe9476dd8b907681fc38d0bae78854 Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Wed, 18 Jun 2014 18:40:22 +0200 Subject: block/iscsi: drop obsolete pointers from iscsi_co_writev Signed-off-by: Peter Lieven Signed-off-by: Paolo Bonzini --- block/iscsi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'block') diff --git a/block/iscsi.c b/block/iscsi.c index 327353c3b6..84aa22a62e 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -359,8 +359,6 @@ static int coroutine_fn iscsi_co_writev(BlockDriverState *bs, struct IscsiTask iTask; uint64_t lba; uint32_t num_sectors; - uint8_t *data = NULL; - uint8_t *buf = NULL; if (!is_request_lun_aligned(sector_num, nb_sectors, iscsilun)) { return -EINVAL; @@ -372,17 +370,16 @@ static int coroutine_fn iscsi_co_writev(BlockDriverState *bs, retry: if (iscsilun->use_16_for_rw) { iTask.task = iscsi_write16_task(iscsilun->iscsi, iscsilun->lun, lba, - data, num_sectors * iscsilun->block_size, + NULL, num_sectors * iscsilun->block_size, iscsilun->block_size, 0, 0, 0, 0, 0, iscsi_co_generic_cb, &iTask); } else { iTask.task = iscsi_write10_task(iscsilun->iscsi, iscsilun->lun, lba, - data, num_sectors * iscsilun->block_size, + NULL, num_sectors * iscsilun->block_size, iscsilun->block_size, 0, 0, 0, 0, 0, iscsi_co_generic_cb, &iTask); } if (iTask.task == NULL) { - g_free(buf); return -ENOMEM; } scsi_task_set_iov_out(iTask.task, (struct scsi_iovec *) iov->iov, @@ -402,8 +399,6 @@ retry: goto retry; } - g_free(buf); - if (iTask.status != SCSI_STATUS_GOOD) { return -EIO; } -- cgit v1.2.3