* [Qemu-devel] [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path()
@ 2011-01-20 6:57 Isaku Yamahata
2011-01-20 13:45 ` [Qemu-devel] " Michael S. Tsirkin
0 siblings, 1 reply; 2+ messages in thread
From: Isaku Yamahata @ 2011-01-20 6:57 UTC (permalink / raw)
To: qemu-devel; +Cc: yamahata, mst
use qemu_malloc() instead of direct use of malloc().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path()
2011-01-20 6:57 [Qemu-devel] [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path() Isaku Yamahata
@ 2011-01-20 13:45 ` Michael S. Tsirkin
0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2011-01-20 13:45 UTC (permalink / raw)
To: Isaku Yamahata; +Cc: qemu-devel
On Thu, Jan 20, 2011 at 03:57:49PM +0900, Isaku Yamahata wrote:
> use qemu_malloc() instead of direct use of malloc().
>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> ---
> hw/pci.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Thanks, applied.
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-20 13:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-20 6:57 [Qemu-devel] [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path() Isaku Yamahata
2011-01-20 13:45 ` [Qemu-devel] " Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).