]> git.proxmox.com Git - mirror_qemu.git/commitdiff
linux-user/qemu.h: change malloc to g_malloc, free to g_free
authorMd Haris Iqbal <haris.phnx@gmail.com>
Wed, 23 Mar 2016 18:32:03 +0000 (00:02 +0530)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 15 Sep 2016 12:32:22 +0000 (15:32 +0300)
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>
linux-user/qemu.h

index bef465de4d9337dead893a97bf65d3769895b37d..815447f5fc955d76328dbf6a9e8ba643513f31f7 100644 (file)
@@ -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
 }