@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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,
Signed-off-by: Laszlo Ersek <lersek@redhat.com> --- 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(-)