From d7aa9e1659cedff36e7bed148fd0a3ebae63e255 Mon Sep 17 00:00:00 2001 From: Prerna Garg Date: Tue, 11 Apr 2017 21:50:29 +0530 Subject: [PATCH] Changed malloc to g_malloc in block/iscsi.c file Signed-off-by: Prerna Garg --- block/iscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 716e74a..b926ed4 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1034,7 +1034,7 @@ static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState *bs, return NULL; } - acb->task = malloc(sizeof(struct scsi_task)); + acb->task = g_malloc(sizeof(struct scsi_task)); if (acb->task == NULL) { error_report("iSCSI: Failed to allocate task for scsi command. %s", iscsi_get_error(iscsi)); @@ -1398,7 +1398,7 @@ static void iscsi_readcapacity_sync(IscsiLun *iscsilun, Error **errp) struct scsi_task *task = NULL; struct scsi_readcapacity10 *rc10 = NULL; struct scsi_readcapacity16 *rc16 = NULL; - int retries = ISCSI_CMD_RETRIES; + int retries = ISCSI_CMD_RETRIES; do { if (task != NULL) { -- 2.7.4