projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e407bf1
)
pci: use qemu_malloc() in pcibus_get_dev_path()
author
Isaku Yamahata
<yamahata@valinux.co.jp>
Thu, 20 Jan 2011 06:57:49 +0000
(15:57 +0900)
committer
Michael S. Tsirkin
<mst@redhat.com>
Thu, 20 Jan 2011 13:44:25 +0000
(15:44 +0200)
use qemu_malloc() instead of direct use of malloc().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci.c
patch
|
blob
|
history
diff --git
a/hw/pci.c
b/hw/pci.c
index
1ffe428
..
b8f5385
100644
(file)
--- a/
hw/pci.c
+++ b/
hw/pci.c
@@
-2058,7
+2058,7
@@
static char *pcibus_get_dev_path(DeviceState *dev)
path_len = domain_len + slot_len * slot_depth;
/* Allocate memory, fill in the terminating null byte. */
- path = malloc(path_len + 1 /* For '\0' */);
+ path =
qemu_
malloc(path_len + 1 /* For '\0' */);
path[path_len] = '\0';
/* First field is the domain. */