aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-11-07 23:27:30 +0400
committerThomas Huth <thuth@redhat.com>2019-11-11 13:01:46 +0100
commit36524a1a3dd280189b3129029caa5d114b41b2c0 (patch)
tree22efc30ee657e52e70ee34f74411e05ada0f6071
parent654efcb511d394c1d3f5292c28503d1d19e5b1d3 (diff)
downloadqemu-36524a1a3dd280189b3129029caa5d114b41b2c0.tar.gz
qtest: fix qtest_qmp_device_add leak
Spotted by ASAN. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20191107192731.17330-3-marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Fixes: b4510bb4109f5f ("tests: add qtest_qmp_device_add_qdict() helper") Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r--tests/libqtest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 3706bccd8d5..91e9cb220c5 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -1274,6 +1274,7 @@ void qtest_qmp_device_add(QTestState *qts, const char *driver, const char *id,
qdict_put_str(args, "id", id);
qtest_qmp_device_add_qdict(qts, driver, args);
+ qobject_unref(args);
}
static void device_deleted_cb(void *opaque, const char *name, QDict *data)