From 36524a1a3dd280189b3129029caa5d114b41b2c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 7 Nov 2019 23:27:30 +0400 Subject: qtest: fix qtest_qmp_device_add leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Spotted by ASAN. Signed-off-by: Marc-André Lureau Message-Id: <20191107192731.17330-3-marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth Fixes: b4510bb4109f5f ("tests: add qtest_qmp_device_add_qdict() helper") Signed-off-by: Thomas Huth --- tests/libqtest.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/libqtest.c b/tests/libqtest.c index 3706bccd8d..91e9cb220c 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) -- cgit v1.2.3