qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path()
Date: Thu, 20 Jan 2011 15:45:04 +0200	[thread overview]
Message-ID: <20110120134504.GB15426@redhat.com> (raw)
In-Reply-To: <14aa6d9be3106715ceb3a04845ad59d435efc898.1295506335.git.yamahata@valinux.co.jp>

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

      reply	other threads:[~2011-01-20 13:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110120134504.GB15426@redhat.com \
    --to=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yamahata@valinux.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).