mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
tests: fix vhost-user-test leaks
Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
fb6faea888
commit
0c0eb30260
3 changed files with 15 additions and 4 deletions
|
@ -27,6 +27,12 @@ typedef struct QVirtioPCIForeachData {
|
|||
void *user_data;
|
||||
} QVirtioPCIForeachData;
|
||||
|
||||
void qvirtio_pci_device_free(QVirtioPCIDevice *dev)
|
||||
{
|
||||
g_free(dev->pdev);
|
||||
g_free(dev);
|
||||
}
|
||||
|
||||
static QVirtioPCIDevice *qpcidevice_to_qvirtiodevice(QPCIDevice *pdev)
|
||||
{
|
||||
QVirtioPCIDevice *vpcidev;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue