[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/6] cpu-plug-test: fix leaks
From: |
Thomas Huth |
Subject: |
[PULL 2/6] cpu-plug-test: fix leaks |
Date: |
Tue, 12 Nov 2019 07:43:28 +0100 |
From: Marc-André Lureau <address@hidden>
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Fixes: 021a007efc3 ("cpu-plug-test: fix device_add for pc/q35 machines")
Signed-off-by: Thomas Huth <address@hidden>
---
tests/cpu-plug-test.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c
index 058cef5ac1..30e514bbfb 100644
--- a/tests/cpu-plug-test.c
+++ b/tests/cpu-plug-test.c
@@ -99,6 +99,7 @@ static void test_plug_with_device_add(gconstpointer data)
cpu = qobject_to(QDict, e);
if (qdict_haskey(cpu, "qom-path")) {
+ qobject_unref(e);
continue;
}
@@ -107,6 +108,7 @@ static void test_plug_with_device_add(gconstpointer data)
qtest_qmp_device_add_qdict(qts, td->device_model, props);
hotplugged++;
+ qobject_unref(e);
}
/* make sure that there were hotplugged CPUs */
--
2.23.0
- [PULL 0/6] qtest and misc patches, Thomas Huth, 2019/11/12
- [PULL 2/6] cpu-plug-test: fix leaks,
Thomas Huth <=
- [PULL 1/6] qtest: fix qtest_qmp_device_add leak, Thomas Huth, 2019/11/12
- [PULL 3/6] MAINTAINERS: slirp: Remove myself as maintainer, Thomas Huth, 2019/11/12
- [PULL 4/6] tests/migration: Print some debug on bad status, Thomas Huth, 2019/11/12
- [PULL 5/6] configure: Only decompress EDK2 blobs for X86/ARM targets, Thomas Huth, 2019/11/12
- [PULL 6/6] configure: Check bzip2 is available, Thomas Huth, 2019/11/12
- Re: [PULL 0/6] qtest and misc patches, Peter Maydell, 2019/11/12