usb-ccid: fix bus leak

qbus_create_inplace() creates a new reference in realize(), it must be
released in unrealize().

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180531195119.22021-4-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Marc-André Lureau 2018-05-31 21:51:18 +02:00 committed by Gerd Hoffmann
parent 265b578c58
commit 410a096adf

View file

@ -1147,6 +1147,7 @@ static void ccid_unrealize(USBDevice *dev, Error **errp)
USBCCIDState *s = USB_CCID_DEV(dev);
ccid_bulk_in_clear(s);
object_unref(OBJECT(&s->bus));
}
static void ccid_flush_pending_answers(USBCCIDState *s)