aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2011-01-20 15:57:49 +0900
committerMichael S. Tsirkin <mst@redhat.com>2011-01-20 15:44:25 +0200
commite10990c3f0c39e92ab5f74004b89a24fcc36fa14 (patch)
tree3497161b09fd16102f4782815cf5f9d36e3e46d4 /hw/pci.c
parente407bf13ba65163a8f8669e0157839bbefdb43b8 (diff)
downloadqemu-e10990c3f0c39e92ab5f74004b89a24fcc36fa14.zip
qemu-e10990c3f0c39e92ab5f74004b89a24fcc36fa14.tar.gz
qemu-e10990c3f0c39e92ab5f74004b89a24fcc36fa14.tar.bz2
pci: use qemu_malloc() in pcibus_get_dev_path()
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>
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 1ffe428..b8f5385 100644
--- 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. */