diff options
author | Peter Lieven <pl@kamp.de> | 2014-06-18 18:40:22 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-06-18 18:42:42 +0200 |
commit | 8c215a9fbdfe9476dd8b907681fc38d0bae78854 (patch) | |
tree | eb4bf71e87648f047c5ac8f4f34afcb92be25abe /block/iscsi.c | |
parent | 9d2e256e62738f17d067258012f9a32e74bb9a8e (diff) |
block/iscsi: drop obsolete pointers from iscsi_co_writev
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'block/iscsi.c')
-rw-r--r-- | block/iscsi.c | 9 |
1 files changed, 2 insertions, 7 deletions
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; } |