summaryrefslogtreecommitdiff
path: root/hw/usb/dev-uas.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-02-07 15:48:58 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-03-01 11:51:29 +0400
commitcd7bc87868d534f95e928cad98e2a52df7695771 (patch)
tree5b60a89bf40e5b84c22eaa5cdf3f4e3a128f6863 /hw/usb/dev-uas.c
parent675f22c6d3b0b4b66efa27f978f2bd9575b5a5ab (diff)
usb: release the created buses
Leaks spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/dev-uas.c')
-rw-r--r--hw/usb/dev-uas.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c
index 3b26655889..fffc424396 100644
--- a/hw/usb/dev-uas.c
+++ b/hw/usb/dev-uas.c
@@ -896,6 +896,8 @@ static void usb_uas_unrealize(USBDevice *dev, Error **errp)
UASDevice *uas = USB_UAS(dev);
qemu_bh_delete(uas->status_bh);
+
+ object_unref(OBJECT(&uas->bus));
}
static void usb_uas_realize(USBDevice *dev, Error **errp)