linux-user/qemu.h: change malloc to g_malloc, free to g_free
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>
This commit is contained in:
parent
7ad9339e37
commit
38e826de00
@ -548,7 +548,7 @@ static inline void *lock_user(int type, abi_ulong guest_addr, long len, int copy
|
|||||||
#ifdef DEBUG_REMAP
|
#ifdef DEBUG_REMAP
|
||||||
{
|
{
|
||||||
void *addr;
|
void *addr;
|
||||||
addr = malloc(len);
|
addr = g_malloc(len);
|
||||||
if (copy)
|
if (copy)
|
||||||
memcpy(addr, g2h(guest_addr), len);
|
memcpy(addr, g2h(guest_addr), len);
|
||||||
else
|
else
|
||||||
@ -574,7 +574,7 @@ static inline void unlock_user(void *host_ptr, abi_ulong guest_addr,
|
|||||||
return;
|
return;
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
memcpy(g2h(guest_addr), host_ptr, len);
|
memcpy(g2h(guest_addr), host_ptr, len);
|
||||||
free(host_ptr);
|
g_free(host_ptr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user