qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path()


From: Isaku Yamahata
Subject: [Qemu-devel] [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path()
Date: Thu, 20 Jan 2011 15:57:49 +0900

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

Signed-off-by: Isaku Yamahata <address@hidden>
---
 hw/pci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/pci.c b/hw/pci.c
index 851f350..86af0ee 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -2053,7 +2053,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. */
-- 
1.7.1.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]