From e10990c3f0c39e92ab5f74004b89a24fcc36fa14 Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Thu, 20 Jan 2011 15:57:49 +0900 Subject: [PATCH] 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 --- hw/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */