diff options
Diffstat (limited to 'qapi/opts-visitor.c')
-rw-r--r-- | qapi/opts-visitor.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index 72c95ac..1048bbc 100644 --- a/qapi/opts-visitor.c +++ b/qapi/opts-visitor.c @@ -518,11 +518,15 @@ opts_free(Visitor *v) { OptsVisitor *ov = to_ov(v); - opts_visitor_cleanup(ov); + 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; @@ -553,23 +557,5 @@ opts_visitor_new(const QemuOpts *opts) ov->opts_root = opts; - return ov; -} - - -void -opts_visitor_cleanup(OptsVisitor *ov) -{ - if (ov->unprocessed_opts != NULL) { - g_hash_table_destroy(ov->unprocessed_opts); - } - g_free(ov->fake_id_opt); - g_free(ov); -} - - -Visitor * -opts_get_visitor(OptsVisitor *ov) -{ return &ov->visitor; } |