summaryrefslogtreecommitdiff
path: root/linux-user/qemu.h
diff options
context:
space:
mode:
authorMd Haris Iqbal <haris.phnx@gmail.com>2016-03-24 00:02:03 +0530
committerMichael Tokarev <mjt@tls.msk.ru>2016-09-15 15:32:22 +0300
commit38e826de00f019d6f833d39ebd72f9ab15f3da1c (patch)
tree4dccab670036e83079f3a0de3b7d5c1de7424ca0 /linux-user/qemu.h
parent7ad9339e372fcd12d584684d7f52ac259604a4f4 (diff)
downloadqemu-38e826de00f019d6f833d39ebd72f9ab15f3da1c.tar.gz
linux-user/qemu.h: change malloc to g_malloc, free to g_free
Signed-off-by: Md Haris Iqbal <haris.phnx@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'linux-user/qemu.h')
-rw-r--r--linux-user/qemu.h4
1 files changed, 2 insertions, 2 deletions
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
}