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:
parent
654efcb511
commit
36524a1a3d
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue