projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ad9339
)
linux-user/qemu.h: change malloc to g_malloc, free to g_free
author
Md Haris Iqbal
<haris.phnx@gmail.com>
Wed, 23 Mar 2016 18:32:03 +0000
(
00:02
+0530)
committer
Michael 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
patch
|
blob
|
history
diff --git
a/linux-user/qemu.h
b/linux-user/qemu.h
index bef465de4d9337dead893a97bf65d3769895b37d..815447f5fc955d76328dbf6a9e8ba643513f31f7 100644
(file)
--- a/
linux-user/qemu.h
+++ b/
linux-user/qemu.h
@@
-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
}