diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-02-03 16:06:12 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-03-01 11:51:00 +0400 |
commit | 0c0eb30260b424d2a68603b89f1d829db18772c2 (patch) | |
tree | beed47ac4fdee819286926bb9a180be5d423a329 /tests/libqos/virtio-pci.c | |
parent | fb6faea888c1e54059aed7f87be93de623b346ee (diff) | |
download | qemu-0c0eb30260b424d2a68603b89f1d829db18772c2.zip qemu-0c0eb30260b424d2a68603b89f1d829db18772c2.tar.gz qemu-0c0eb30260b424d2a68603b89f1d829db18772c2.tar.bz2 |
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>
Diffstat (limited to 'tests/libqos/virtio-pci.c')
-rw-r--r-- | tests/libqos/virtio-pci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/libqos/virtio-pci.c b/tests/libqos/virtio-pci.c index d4bf841..456cccd 100644 --- a/tests/libqos/virtio-pci.c +++ b/tests/libqos/virtio-pci.c @@ -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; |