pci: use qemu_malloc() in pcibus_get_dev_path()
authorIsaku Yamahata <yamahata@valinux.co.jp>
Thu, 20 Jan 2011 06:57:49 +0000 (15:57 +0900)
committerMichael 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

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. */