From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQTy-0005yU-G6 for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:34:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPQTw-0003Jx-Gd for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:34:25 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:36452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPQTw-0003Js-A5 for qemu-devel@nongnu.org; Tue, 19 Jul 2016 04:34:24 -0400 Received: by mail-wm0-x244.google.com with SMTP id x83so2003973wma.3 for ; Tue, 19 Jul 2016 01:34:24 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 19 Jul 2016 10:34:09 +0200 Message-Id: <1468917259-8475-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1468917259-8475-1-git-send-email-pbonzini@redhat.com> References: <1468917259-8475-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 02/12] Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Md Haris Iqbal From: Md Haris Iqbal Signed-off-by: Md Haris Iqbal Message-Id: <1459861743-4514-1-git-send-email-haris.phnx@gmail.com> Reviewed-by: Sean Bruno Signed-off-by: Paolo Bonzini --- bsd-user/qemu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 53163b8..6ccc544 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -358,7 +358,7 @@ static inline void *lock_user(int type, abi_ulong guest_addr, long len, int copy #ifdef DEBUG_REMAP { void *addr; - addr = malloc(len); + addr = g_malloc(len); if (copy) memcpy(addr, g2h(guest_addr), len); else @@ -384,7 +384,7 @@ static inline void unlock_user(void *host_ptr, abi_ulong guest_addr, return; if (len > 0) memcpy(g2h(guest_addr), host_ptr, len); - free(host_ptr); + g_free(host_ptr); #endif } -- 2.7.4