From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0cR1-0000tL-FD for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:53:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0cR0-0006iT-S8 for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:53:39 -0400 Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 6 Oct 2017 20:49:48 -0300 Message-Id: <20171006235023.11952-54-f4bug@amsat.org> In-Reply-To: <20171006235023.11952-1-f4bug@amsat.org> References: <20171006235023.11952-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 53/88] iSCSI: use g_new() family of functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Markus Armbruster , Eric Blake , Ronnie Sahlberg , Paolo Bonzini , Peter Lieven , Kevin Wolf , Max Reitz Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-devel@nongnu.org, qemu trival , qemu-block@nongnu.org From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- block/iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/iscsi.c b/block/iscsi.c index 4683f3b244..f9f910168d 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1001,7 +1001,7 @@ static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState *bs, return NULL; } - acb->task = malloc(sizeof(struct scsi_task)); + acb->task = g_new(struct scsi_task, 1); if (acb->task == NULL) { error_report("iSCSI: Failed to allocate task for scsi command. %s", iscsi_get_error(iscsi)); -- 2.14.2