]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h
authorMd Haris Iqbal <haris.phnx@gmail.com>
Tue, 5 Apr 2016 13:09:03 +0000 (18:39 +0530)
committerPaolo Bonzini <pbonzini@redhat.com>
Sun, 17 Jul 2016 07:59:21 +0000 (09:59 +0200)
Signed-off-by: Md Haris Iqbal <haris.phnx@gmail.com>
Message-Id: <1459861743-4514-1-git-send-email-haris.phnx@gmail.com>
Reviewed-by: Sean Bruno <sbruno@freebsd.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
bsd-user/qemu.h

index 53163b8a476cb2a34deca0e6ecb1797ec4c1be50..6ccc544e7d77610aca790d8569bdd682f496c054 100644 (file)
@@ -358,7 +358,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
@@ -384,7 +384,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
 }