aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/usb.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-02-07 15:47:39 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2017-03-01 11:51:29 +0400
commit62030ed135e4cfb960cb626510cbb3ea77bb9ef9 (patch)
treea64cf3de98fe919ccfc46d50c864ba2fd496905e /tests/libqos/usb.c
parentd3510ff9d7e78c89ee41175082ae5390e6e5b285 (diff)
tests: fix usb-test leaks
Fix the usb tests leaks. Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'tests/libqos/usb.c')
-rw-r--r--tests/libqos/usb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/libqos/usb.c b/tests/libqos/usb.c
index 98408d93f3..0cdfaecda7 100644
--- a/tests/libqos/usb.c
+++ b/tests/libqos/usb.c
@@ -24,6 +24,11 @@ void qusb_pci_init_one(QPCIBus *pcibus, struct qhc *hc, uint32_t devfn, int bar)
hc->bar = qpci_iomap(hc->dev, bar, NULL);
}
+void uhci_deinit(struct qhc *hc)
+{
+ g_free(hc->dev);
+}
+
void uhci_port_test(struct qhc *hc, int port, uint16_t expect)
{
uint16_t value = qpci_io_readw(hc->dev, hc->bar, 0x10 + 2 * port);