aboutsummaryrefslogtreecommitdiff
path: root/bsd-user
diff options
context:
space:
mode:
authorMd Haris Iqbal <haris.phnx@gmail.com>2016-04-05 18:39:03 +0530
committerPaolo Bonzini <pbonzini@redhat.com>2016-07-17 09:59:21 +0200
commitfd9a30483091eb2e297401dd1d860045188d779a (patch)
tree7f9f64c672efb5349086acbd7e5665077d76596d /bsd-user
parent55ad781ca7fcaed19e04554b558727206d638a99 (diff)
downloadqemu-fd9a30483091eb2e297401dd1d860045188d779a.zip
qemu-fd9a30483091eb2e297401dd1d860045188d779a.tar.gz
qemu-fd9a30483091eb2e297401dd1d860045188d779a.tar.bz2
Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h
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>
Diffstat (limited to 'bsd-user')
-rw-r--r--bsd-user/qemu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h
index 53163b8..6ccc544 100644
--- a/bsd-user/qemu.h
+++ b/bsd-user/qemu.h
@@ -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
}