diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-11-07 23:27:31 +0400 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2019-11-11 13:02:30 +0100 |
commit | 741309136e54fdcfff701d2311b4137b92c8b3c8 (patch) | |
tree | c3aabf0667549933d4fe4b0a688b0d0b02a27ea0 /tests | |
parent | 36524a1a3dd280189b3129029caa5d114b41b2c0 (diff) | |
download | qemu-741309136e54fdcfff701d2311b4137b92c8b3c8.zip qemu-741309136e54fdcfff701d2311b4137b92c8b3c8.tar.gz qemu-741309136e54fdcfff701d2311b4137b92c8b3c8.tar.bz2 |
cpu-plug-test: fix leaks
Spotted by ASAN.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20191107192731.17330-4-marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Fixes: 021a007efc3 ("cpu-plug-test: fix device_add for pc/q35 machines")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cpu-plug-test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/cpu-plug-test.c b/tests/cpu-plug-test.c index 058cef5..30e514b 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 */ |