qmp-output-visitor: Favor new visit_free() function

Now that we have a polymorphic visit_free(), we no longer need
qmp_output_visitor_cleanup(); however, we still need to
expose the subtype for qmp_output_get_qobject().

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1465490926-28625-10-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Eric Blake
2016-06-09 10:48:40 -06:00
committed by Markus Armbruster
parent e7ca565629
commit 1830f22a67
10 changed files with 14 additions and 21 deletions

View File

@@ -500,7 +500,7 @@ static void dump_json_image_check(ImageCheck *check, bool quiet)
assert(str != NULL);
qprintf(quiet, "%s\n", qstring_get_str(str));
qobject_decref(obj);
qmp_output_visitor_cleanup(ov);
visit_free(qmp_output_get_visitor(ov));
QDECREF(str);
}
@@ -2190,7 +2190,7 @@ static void dump_json_image_info_list(ImageInfoList *list)
assert(str != NULL);
printf("%s\n", qstring_get_str(str));
qobject_decref(obj);
qmp_output_visitor_cleanup(ov);
visit_free(qmp_output_get_visitor(ov));
QDECREF(str);
}
@@ -2206,7 +2206,7 @@ static void dump_json_image_info(ImageInfo *info)
assert(str != NULL);
printf("%s\n", qstring_get_str(str));
qobject_decref(obj);
qmp_output_visitor_cleanup(ov);
visit_free(qmp_output_get_visitor(ov));
QDECREF(str);
}