Eric Blake <ebl...@redhat.com> writes: > Now that we have a polymorphic visit_free(), we no longer need > opts_visitor_cleanup(); which in turn means we no longer need > to return a subtype from opts_visitor_new() nor a public upcast > function. > > Signed-off-by: Eric Blake <ebl...@redhat.com> [...] > diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c > index 28d2203..6e65317 100644 > --- a/qapi/opts-visitor.c > +++ b/qapi/opts-visitor.c > @@ -517,11 +517,15 @@ static void > opts_free(Visitor *v) > { > OptsVisitor *ov = to_ov(v); > - opts_visitor_cleanup(ov);
Blank line between declaration and statements, please. > + if (ov->unprocessed_opts != NULL) { > + g_hash_table_destroy(ov->unprocessed_opts); > + } > + g_free(ov->fake_id_opt); > + g_free(ov); > } > > > -OptsVisitor * > +Visitor * > opts_visitor_new(const QemuOpts *opts) > { > OptsVisitor *ov; [...]