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>
This commit is contained in:
Isaku Yamahata 2011-01-20 15:57:49 +09:00 committed by Michael S. Tsirkin
parent e407bf13ba
commit e10990c3f0
1 changed files with 1 additions and 1 deletions

View File

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