Commit e10990c3 authored by Isaku Yamahata's avatar Isaku Yamahata Committed by Michael S. Tsirkin
Browse files

pci: use qemu_malloc() in pcibus_get_dev_path()



use qemu_malloc() instead of direct use of malloc().

Signed-off-by: default avatarIsaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent e407bf13
......@@ -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. */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment