提交 fd9a3048 编写于 作者: M Md Haris Iqbal 提交者: Paolo Bonzini

Changed malloc to g_malloc, free to g_free in bsd-user/qemu.h

Signed-off-by: NMd Haris Iqbal <haris.phnx@gmail.com>
Message-Id: <1459861743-4514-1-git-send-email-haris.phnx@gmail.com>
Reviewed-by: NSean Bruno <sbruno@freebsd.org>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 55ad781c
......@@ -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
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册