From: Md Haris Iqbal Date: Wed, 23 Mar 2016 18:32:03 +0000 (+0530) Subject: linux-user/qemu.h: change malloc to g_malloc, free to g_free X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=38e826de00f019d6f833d39ebd72f9ab15f3da1c;p=qemu.git linux-user/qemu.h: change malloc to g_malloc, free to g_free Signed-off-by: Md Haris Iqbal Reviewed-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev --- diff --git a/linux-user/qemu.h b/linux-user/qemu.h index bef465de4d..815447f5fc 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -548,7 +548,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 @@ -574,7 +574,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 }