projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1760048
)
libqos: remove some leaks
author
Marc-André Lureau
<marcandre.lureau@redhat.com>
Fri, 18 Dec 2015 14:13:32 +0000
(15:13 +0100)
committer
Marc-André Lureau
<marcandre.lureau@redhat.com>
Tue, 2 Feb 2016 12:28:58 +0000
(13:28 +0100)
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>
tests/libqos/pci.c
patch
|
blob
|
history
diff --git
a/tests/libqos/pci.c
b/tests/libqos/pci.c
index 4e630c250a2d3769ff66fc1699a3525b668ff65e..80b1a2117d081a4bb8a8dca2cb35fa27d7382f93 100644
(file)
--- 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;
}