From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0cP4-0007TL-8l for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:51:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0cP3-0005BZ-Hr for qemu-devel@nongnu.org; Fri, 06 Oct 2017 19:51:38 -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:13 -0300 Message-Id: <20171006235023.11952-19-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 18/88] memory: 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 , Paolo Bonzini , Michael Tokarev , Alex Williamson Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-devel@nongnu.org, Kevin Wolf , qemu trival From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- does this file belong to the Memory API subsystem in MAINTAINERS? memory_mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory_mapping.c b/memory_mapping.c index a5d38552a6..9c78b41363 100644 --- a/memory_mapping.c +++ b/memory_mapping.c @@ -43,7 +43,7 @@ static void create_new_memory_mapping(MemoryMappingList *list, { MemoryMapping *memory_mapping; - memory_mapping = g_malloc(sizeof(MemoryMapping)); + memory_mapping = g_new(MemoryMapping, 1); memory_mapping->phys_addr = phys_addr; memory_mapping->virt_addr = virt_addr; memory_mapping->length = length; -- 2.14.2