[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path()
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path() |
Date: |
Thu, 20 Jan 2011 15:45:04 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
> ---
> 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