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: b4510bb410 ("tests: add qtest_qmp_device_add_qdict() helper")
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Marc-André Lureau 2019-11-07 23:27:30 +04:00 committed by Thomas Huth
parent 654efcb511
commit 36524a1a3d
1 changed files with 1 additions and 0 deletions

View File

@ -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)