Andreas Färber <afaer...@suse.de> writes: > Am 04.06.2013 20:51, schrieb Paolo Bonzini: >> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> >> --- >> hw/scsi/scsi-bus.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c >> index 53ea906..e443193 100644 >> --- a/hw/scsi/scsi-bus.c >> +++ b/hw/scsi/scsi-bus.c >> @@ -516,6 +516,8 @@ SCSIRequest *scsi_req_alloc(const SCSIReqOps *reqops, >> SCSIDevice *d, >> req->status = -1; >> req->sense_len = 0; >> req->ops = reqops; >> + object_ref(OBJECT(d)); >> + object_ref(OBJECT(req->bus->qbus.parent)); > > BusState *bus = BUS(req->bus); > ... > object_ref(OBJECT(bus->parent)); > > Same below.
If Paolo has to respin, ack. But for both ways: Reviewed-by: Anthony Liguori <aligu...@us.ibm.com> Regards, Anthony Liguori > > Andreas > >> trace_scsi_req_alloc(req->dev->id, req->lun, req->tag); >> return req; >> } >> @@ -1505,6 +1507,8 @@ void scsi_req_unref(SCSIRequest *req) >> if (req->ops->free_req) { >> req->ops->free_req(req); >> } >> + object_unref(OBJECT(req->dev)); >> + object_unref(OBJECT(bus->qbus.parent)); >> g_free(req); >> } >> } >> > > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg