From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aina0-0005HA-Eg for qemu-devel@nongnu.org; Wed, 23 Mar 2016 14:32:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ainZx-00074r-8z for qemu-devel@nongnu.org; Wed, 23 Mar 2016 14:32:28 -0400 From: Md Haris Iqbal Date: Thu, 24 Mar 2016 00:02:03 +0530 Message-Id: <1458757923-11362-1-git-send-email-haris.phnx@gmail.com> Subject: [Qemu-devel] [Qemu-Devel] [PATCH] Changed malloc to g_malloc, free to g_free in linux-user/qemu.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Md Haris Iqbal Signed-off-by: Md Haris Iqbal --- linux-user/qemu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 26b0ba2..3c3fd15 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -381,7 +381,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 @@ -407,7 +407,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 } -- 1.9.1