aboutsummaryrefslogtreecommitdiff
path: root/tests/cpu-plug-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cpu-plug-test.c')
-rw-r--r--tests/cpu-plug-test.c2
1 files changed, 2 insertions, 0 deletions
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 */