qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PULL 26/27] linux-user/qemu.h: change malloc to g_malloc


From: Michael Tokarev
Subject: [Qemu-trivial] [PULL 26/27] linux-user/qemu.h: change malloc to g_malloc, free to g_free
Date: Wed, 14 Sep 2016 10:58:52 +0300

From: Md Haris Iqbal <address@hidden>

Signed-off-by: Md Haris Iqbal <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
 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 bef465d..815447f 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
 }
 
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]