[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/8] libqos: remove some leaks
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PULL 4/8] libqos: remove some leaks |
Date: |
Tue, 2 Feb 2016 13:43:32 +0100 |
From: Marc-André Lureau <address@hidden>
qpci_device_find() returns allocated data, don't leak it.
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
---
tests/libqos/pci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/libqos/pci.c b/tests/libqos/pci.c
index 4e630c2..80b1a21 100644
--- a/tests/libqos/pci.c
+++ b/tests/libqos/pci.c
@@ -34,11 +34,13 @@ void qpci_device_foreach(QPCIBus *bus, int vendor_id, int
device_id,
if (vendor_id != -1 &&
qpci_config_readw(dev, PCI_VENDOR_ID) != vendor_id) {
+ g_free(dev);
continue;
}
if (device_id != -1 &&
qpci_config_readw(dev, PCI_DEVICE_ID) != device_id) {
+ g_free(dev);
continue;
}
--
2.5.0
- [Qemu-devel] [PULL 0/8] Ivshmem patches, marcandre . lureau, 2016/02/02
- [Qemu-devel] [PULL 1/8] ivshmem: no need for opaque argument, marcandre . lureau, 2016/02/02
- [Qemu-devel] [PULL 3/8] ivshmem-test: leak fixes, marcandre . lureau, 2016/02/02
- [Qemu-devel] [PULL 5/8] ivshmem-test: test both msi & irq cases, marcandre . lureau, 2016/02/02
- [Qemu-devel] [PULL 2/8] ivshmem: remove redundant assignment, fix crash with msi=off, marcandre . lureau, 2016/02/02
- [Qemu-devel] [PULL 4/8] libqos: remove some leaks,
marcandre . lureau <=
- [Qemu-devel] [PULL 6/8] ivshmem: generalize ivshmem_setup_interrupts, marcandre . lureau, 2016/02/02
- [Qemu-devel] [PULL 7/8] ivshmem: use a single eventfd callback, get rid of CharDriver, marcandre . lureau, 2016/02/02
- [Qemu-devel] [PULL 8/8] char: remove qemu_chr_open_eventfd, marcandre . lureau, 2016/02/02
- Re: [Qemu-devel] [PULL 0/8] Ivshmem patches, Peter Maydell, 2016/02/02