aboutsummaryrefslogtreecommitdiff
path: root/qapi/opts-visitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'qapi/opts-visitor.c')
-rw-r--r--qapi/opts-visitor.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c
index dcfbf92faf..72c95ac7c1 100644
--- a/qapi/opts-visitor.c
+++ b/qapi/opts-visitor.c
@@ -513,6 +513,15 @@ opts_optional(Visitor *v, const char *name, bool *present)
}
+static void
+opts_free(Visitor *v)
+{
+ OptsVisitor *ov = to_ov(v);
+
+ opts_visitor_cleanup(ov);
+}
+
+
OptsVisitor *
opts_visitor_new(const QemuOpts *opts)
{
@@ -540,6 +549,7 @@ opts_visitor_new(const QemuOpts *opts)
* skip some mandatory methods... */
ov->visitor.optional = &opts_optional;
+ ov->visitor.free = opts_free;
ov->opts_root = opts;