qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [Qemu-Devel] [PATCH] Changed malloc to g_malloc, free to g_free in linux-user/qemu.h
@ 2016-03-23 18:32 Md Haris Iqbal
  2016-03-29 15:53 ` haris iqbal
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Md Haris Iqbal @ 2016-03-23 18:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Md Haris Iqbal

Signed-off-by: Md Haris Iqbal <haris.phnx@gmail.com>
---
 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



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-09-14  7:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-23 18:32 [Qemu-trivial] [Qemu-Devel] [PATCH] Changed malloc to g_malloc, free to g_free in linux-user/qemu.h Md Haris Iqbal
2016-03-29 15:53 ` haris iqbal
2016-03-30 14:06   ` haris iqbal
2016-03-30 14:09 ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi
2016-03-30 16:28   ` haris iqbal
2016-03-31  9:42     ` Stefan Hajnoczi
2016-03-31 10:57       ` haris iqbal
2016-05-03  9:47         ` haris iqbal
2016-05-05 17:26 ` Stefan Hajnoczi
2016-09-14  7:24 ` [Qemu-trivial] " Michael Tokarev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).