aboutsummaryrefslogtreecommitdiff
path: root/hmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'hmp.c')
-rw-r--r--hmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hmp.c b/hmp.c
index 925601ac3e..fd5daa75b7 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1722,7 +1722,7 @@ void hmp_object_add(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
QemuOpts *opts;
- OptsVisitor *ov;
+ Visitor *v;
Object *obj = NULL;
opts = qemu_opts_from_qdict(qemu_find_opts("object"), qdict, &err);
@@ -1731,9 +1731,9 @@ void hmp_object_add(Monitor *mon, const QDict *qdict)
return;
}
- ov = opts_visitor_new(opts);
- obj = user_creatable_add(qdict, opts_get_visitor(ov), &err);
- opts_visitor_cleanup(ov);
+ v = opts_visitor_new(opts);
+ obj = user_creatable_add(qdict, v, &err);
+ visit_free(v);
qemu_opts_del(opts);
if (err) {