[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] tests/ide: Free pcibus when finishing a test
From: |
Thomas Huth |
Subject: |
[Qemu-devel] [PATCH] tests/ide: Free pcibus when finishing a test |
Date: |
Tue, 13 Nov 2018 16:11:44 +0100 |
Once a test has finished, the pcibus structure should be freed, to
avoid leaking memory and to make sure that the structure is properly
re-initialized when the next test starts.
Signed-off-by: Thomas Huth <address@hidden>
---
tests/ide-test.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/ide-test.c b/tests/ide-test.c
index 33cef61..f0280e6 100644
--- a/tests/ide-test.c
+++ b/tests/ide-test.c
@@ -142,6 +142,10 @@ static void ide_test_start(const char *cmdline_fmt, ...)
static void ide_test_quit(void)
{
+ if (pcibus) {
+ qpci_free_pc(pcibus);
+ pcibus = NULL;
+ }
pc_alloc_uninit(guest_malloc);
guest_malloc = NULL;
qtest_end();
--
1.8.3.1
- [Qemu-devel] [PATCH for-3.2 7/7] tests/boot-serial: Get rid of global_qtest variable, (continued)
- [Qemu-devel] [PATCH for-3.2 7/7] tests/boot-serial: Get rid of global_qtest variable, Thomas Huth, 2018/11/12
- [Qemu-devel] [PATCH for-3.2 6/7] tests/vmgenid: Make test independent of global_qtest, Thomas Huth, 2018/11/12
- [Qemu-devel] [PATCH for-3.2 2/7] tests/libqos/pci: Make PCI access functions independent of global_qtest, Thomas Huth, 2018/11/12
- [Qemu-devel] [PATCH for-3.2 5/7] tests/acpi-utils: Drop dependence on global_qtest, Thomas Huth, 2018/11/12
- [Qemu-devel] [PATCH for-3.2 4/7] ivshmem-test: Drop dependence on global_qtest, Thomas Huth, 2018/11/12
- Re: [Qemu-devel] [PATCH v1 for-3.2 0/7] Get rid of global_qtest in some of the qtests, no-reply, 2018/11/13
- Re: [Qemu-devel] [PATCH v1 for-3.2 0/7] Get rid of global_qtest in some of the qtests, Thomas Huth, 2018/11/13
- Re: [Qemu-devel] [PATCH v1 for-3.2 0/7] Get rid of global_qtest in some of the qtests, Laurent Vivier, 2018/11/13
- Re: [Qemu-devel] [PATCH v1 for-3.2 0/7] Get rid of global_qtest in some of the qtests, Thomas Huth, 2018/11/13
- [Qemu-devel] [PATCH] tests/ide: Free pcibus when finishing a test,
Thomas Huth <=
- Re: [Qemu-devel] [PATCH] tests/ide: Free pcibus when finishing a test, Eric Blake, 2018/11/13
- Re: [Qemu-devel] [PATCH] tests/ide: Free pcibus when finishing a test, Philippe Mathieu-Daudé, 2018/11/13
- Re: [Qemu-devel] [PATCH] tests/ide: Free pcibus when finishing a test, John Snow, 2018/11/13
Re: [Qemu-devel] [PATCH v1 for-3.2 0/7] Get rid of global_qtest in some of the qtests, no-reply, 2018/11/14