mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
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>
This commit is contained in:
parent
d3510ff9d7
commit
62030ed135
4 changed files with 17 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue