diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2023-07-27 16:07:05 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-09-08 17:03:09 +0200 |
commit | 7966a36c83132c5eebf04a60d9e475b0aa6e7f88 (patch) | |
tree | 27eb8a61eacd9c60e94a3b113f17e18a18caab40 | |
parent | b0a6620acfe4c2997935cb3a9baa0d429ab8d61a (diff) | |
download | qemu-7966a36c83132c5eebf04a60d9e475b0aa6e7f88.zip qemu-7966a36c83132c5eebf04a60d9e475b0aa6e7f88.tar.gz qemu-7966a36c83132c5eebf04a60d9e475b0aa6e7f88.tar.bz2 |
block/iscsi: Document why we use raw malloc()
In block/iscsi.c we use a raw malloc() call, which is unusual
given the project standard is to use the glib memory allocation
functions. Document why we do so, to avoid it being converted
to g_malloc() by mistake.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <20230727150705.2664464-1-peter.maydell@linaro.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block/iscsi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/iscsi.c b/block/iscsi.c index 34f97ab..5640c8b 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1058,6 +1058,7 @@ static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState *bs, return NULL; } + /* Must use malloc(): this is freed via scsi_free_scsi_task() */ acb->task = malloc(sizeof(struct scsi_task)); if (acb->task == NULL) { error_report("iSCSI: Failed to allocate task for scsi command. %s", |