From: Isaku Yamahata Date: Thu, 20 Jan 2011 06:57:49 +0000 (+0900) Subject: pci: use qemu_malloc() in pcibus_get_dev_path() X-Git-Tag: v0.14.0-rc0~109^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e10990c3f0c39e92ab5f74004b89a24fcc36fa14;p=users%2Fdwmw2%2Fqemu.git pci: use qemu_malloc() in pcibus_get_dev_path() use qemu_malloc() instead of direct use of malloc(). Signed-off-by: Isaku Yamahata Signed-off-by: Michael S. Tsirkin --- diff --git a/hw/pci.c b/hw/pci.c index 1ffe428c5c..b8f5385170 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. */