From patchwork Wed Jul 25 00:19:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 173086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 467EE2C0078 for ; Wed, 25 Jul 2012 10:19:23 +1000 (EST) Received: from localhost ([::1]:59758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StpJx-0005YC-BT for incoming@patchwork.ozlabs.org; Tue, 24 Jul 2012 20:19:21 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StpJR-0003zV-Ou for qemu-devel@nongnu.org; Tue, 24 Jul 2012 20:18:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StpJQ-0005vV-GW for qemu-devel@nongnu.org; Tue, 24 Jul 2012 20:18:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StpJQ-0005vQ-56 for qemu-devel@nongnu.org; Tue, 24 Jul 2012 20:18:48 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6P0Ikwd000614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 24 Jul 2012 20:18:47 -0400 Received: from lacos-laptop.usersys.redhat.com (vpn1-7-226.ams2.redhat.com [10.36.7.226]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q6P0IgSv023993; Tue, 24 Jul 2012 20:18:45 -0400 From: Laszlo Ersek To: qemu-devel@nongnu.org, armbru@redhat.com, peter.maydell@linaro.org, lersek@redhat.com Date: Wed, 25 Jul 2012 02:19:55 +0200 Message-Id: <1343175595-7944-3-git-send-email-lersek@redhat.com> In-Reply-To: <87r4s25vs8.fsf@blackfin.pond.sub.org> References: <87r4s25vs8.fsf@blackfin.pond.sub.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 2/2] get_fw_dev_path() impls should allocate memory with glib functions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Laszlo Ersek --- hw/ide/qdev.c | 2 +- hw/isa-bus.c | 2 +- hw/pci.c | 2 +- hw/scsi-bus.c | 2 +- hw/sysbus.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 22e58df..4f15070 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -60,7 +60,7 @@ static char *idebus_get_fw_dev_path(DeviceState *dev) snprintf(path, sizeof(path), "%s@%d", qdev_fw_name(dev), ((IDEBus*)dev->parent_bus)->bus_id); - return strdup(path); + return g_strdup(path); } static int ide_qdev_init(DeviceState *qdev) diff --git a/hw/isa-bus.c b/hw/isa-bus.c index f9b2373..47c93d3 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -236,7 +236,7 @@ static char *isabus_get_fw_dev_path(DeviceState *dev) snprintf(path + off, sizeof(path) - off, "@%04x", d->ioport_id); } - return strdup(path); + return g_strdup(path); } MemoryRegion *isa_address_space(ISADevice *dev) diff --git a/hw/pci.c b/hw/pci.c index 99a4304..ef8996d 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1920,7 +1920,7 @@ static char *pcibus_get_fw_dev_path(DeviceState *dev) PCI_SLOT(d->devfn)); if (PCI_FUNC(d->devfn)) snprintf(path + off, sizeof(path) + off, ",%x", PCI_FUNC(d->devfn)); - return strdup(path); + return g_strdup(path); } static char *pcibus_get_dev_path(DeviceState *dev) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index dc74063..4544d0b 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -1547,7 +1547,7 @@ static char *scsibus_get_fw_dev_path(DeviceState *dev) snprintf(path, sizeof(path), "channel@%x/%s@%x,%x", d->channel, qdev_fw_name(dev), d->id, d->lun); - return strdup(path); + return g_strdup(path); } SCSIDevice *scsi_device_find(SCSIBus *bus, int channel, int id, int lun) diff --git a/hw/sysbus.c b/hw/sysbus.c index 9d8b1ea..c173840 100644 --- a/hw/sysbus.c +++ b/hw/sysbus.c @@ -211,7 +211,7 @@ static char *sysbus_get_fw_dev_path(DeviceState *dev) snprintf(path + off, sizeof(path) - off, "@i%04x", s->pio[0]); } - return strdup(path); + return g_strdup(path); } void sysbus_add_memory(SysBusDevice *dev, target_phys_addr_t addr,