diff options
author | Laurent Vivier <lvivier@redhat.com> | 2016-10-17 12:30:19 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-10-28 09:36:58 +1100 |
commit | f62e0bbb39eec088ff4fbe6a7ec38af51fac5e94 (patch) | |
tree | f16d55c5113c6ff9cf744ac28c2c6760c917e4c0 | |
parent | b1fc72f0fb0aeae4194ff89c454aabe019983d0d (diff) | |
download | qemu-f62e0bbb39eec088ff4fbe6a7ec38af51fac5e94.tar.gz qemu-f62e0bbb39eec088ff4fbe6a7ec38af51fac5e94.tar.bz2 qemu-f62e0bbb39eec088ff4fbe6a7ec38af51fac5e94.zip |
tests: fix memory leak in virtio-scsi-test
vs is allocated in qvirtio_scsi_pci_init() and never freed.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | tests/virtio-scsi-test.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c index 79088bb249..94d75b1493 100644 --- a/tests/virtio-scsi-test.c +++ b/tests/virtio-scsi-test.c @@ -64,6 +64,7 @@ static void qvirtio_scsi_pci_free(QVirtIOSCSI *vs) qvirtio_pci_device_disable(container_of(vs->dev, QVirtioPCIDevice, vdev)); g_free(vs->dev); qpci_free_pc(vs->bus); + g_free(vs); } static uint64_t qvirtio_scsi_alloc(QVirtIOSCSI *vs, size_t alloc_size, |