From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46180 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PfupG-0007A8-O4 for qemu-devel@nongnu.org; Thu, 20 Jan 2011 08:45:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PfupE-0000sQ-KM for qemu-devel@nongnu.org; Thu, 20 Jan 2011 08:45:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PfupE-0000s7-9i for qemu-devel@nongnu.org; Thu, 20 Jan 2011 08:45:20 -0500 Date: Thu, 20 Jan 2011 15:45:04 +0200 From: "Michael S. Tsirkin" Message-ID: <20110120134504.GB15426@redhat.com> References: <14aa6d9be3106715ceb3a04845ad59d435efc898.1295506335.git.yamahata@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <14aa6d9be3106715ceb3a04845ad59d435efc898.1295506335.git.yamahata@valinux.co.jp> Subject: [Qemu-devel] Re: [PATCH] pci: use qemu_malloc() in pcibus_get_dev_path() List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: qemu-devel@nongnu.org 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 > --- > 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