diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2015-12-18 15:13:32 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-02-02 13:28:58 +0100 |
commit | ea53854a54bc54dddeec0c56572adf53384e960c (patch) | |
tree | 9674771e5fbee20cb969cb58b5a319bbbc9f2487 /tests | |
parent | 1760048a5d21bacf0e4838da2f61b2d8db7d2866 (diff) |
libqos: remove some leaks
qpci_device_find() returns allocated data, don't leak it.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libqos/pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/libqos/pci.c b/tests/libqos/pci.c index 4e630c250a..80b1a2117d 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; } |