[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/13] test-qga: fix a resource leak in test_qga_guest_get_osinfo(
From: |
Thomas Huth |
Subject: |
[PULL 06/13] test-qga: fix a resource leak in test_qga_guest_get_osinfo() |
Date: |
Wed, 9 Dec 2020 10:48:49 +0100 |
From: Alex Chen <alex.chen@huawei.com>
The fixture->fd is created in fixture_setup() and, likewise, needs to be closed
in fixture_tear_down().
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20201125102403.57709-1-alex.chen@huawei.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/test-qga.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/test-qga.c b/tests/test-qga.c
index c1b173b3cb..eb33264e8e 100644
--- a/tests/test-qga.c
+++ b/tests/test-qga.c
@@ -111,6 +111,7 @@ fixture_tear_down(TestFixture *fixture, gconstpointer data)
g_rmdir(fixture->test_dir);
g_free(fixture->test_dir);
+ close(fixture->fd);
}
static void qmp_assertion_message_error(const char *domain,
--
2.18.4
- [PULL 00/13] Gitlab-CI and test patches, Thomas Huth, 2020/12/09
- [PULL 01/13] gitlab-ci: Document 'build-tcg-disabled' is a KVM X86 job, Thomas Huth, 2020/12/09
- [PULL 02/13] gitlab-ci: Replace YAML anchors by extends (cross_system_build_job), Thomas Huth, 2020/12/09
- [PULL 03/13] gitlab-ci: Introduce 'cross_accel_build_job' template, Thomas Huth, 2020/12/09
- [PULL 04/13] gitlab-ci: Add KVM s390x cross-build jobs, Thomas Huth, 2020/12/09
- [PULL 05/13] gitlab-ci: Add Xen cross-build jobs, Thomas Huth, 2020/12/09
- [PULL 06/13] test-qga: fix a resource leak in test_qga_guest_get_osinfo(),
Thomas Huth <=
- [PULL 07/13] tests/qtest/fuzz-test: Quit test_lp1878642 once done, Thomas Huth, 2020/12/09
- [PULL 11/13] gitlab-ci: Move user-static test across to gitlab, Thomas Huth, 2020/12/09
- [PULL 12/13] gitlab-ci: Move coroutine tests across to gitlab, Thomas Huth, 2020/12/09
- [PULL 10/13] gitlab-ci: Update 'build-disabled' to cover all configurable options, Thomas Huth, 2020/12/09
- [PULL 13/13] hw/m68k/mcf5206: Don't leak IRQs in mcf5206_mbar_realize(), Thomas Huth, 2020/12/09
- [PULL 09/13] gitlab-ci: Split CONFIGURE_ARGS one argument per line for build-disabled, Thomas Huth, 2020/12/09
- [PULL 08/13] fuzz: avoid double-fetches by default, Thomas Huth, 2020/12/09
- Re: [PULL 00/13] Gitlab-CI and test patches, Peter Maydell, 2020/12/09