Previous commit added qmp_check_input_obj(), it does all the checking we need.
Signed-off-by: Luiz Capitulino <lcapitul...@redhat.com> --- monitor.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index a24a152..c558cc7 100644 --- a/monitor.c +++ b/monitor.c @@ -4239,9 +4239,6 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens) if (!obj) { qerror_report(QERR_QMP_BAD_INPUT_OBJECT, "execute"); goto err_input; - } else if (qobject_type(obj) != QTYPE_QSTRING) { - qerror_report(QERR_QMP_BAD_INPUT_OBJECT_MEMBER, "execute", "string"); - goto err_input; } cmd_name = qstring_get_str(qobject_to_qstring(obj)); @@ -4273,9 +4270,6 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens) obj = qdict_get(input, "arguments"); if (!obj) { args = qdict_new(); - } else if (qobject_type(obj) != QTYPE_QDICT) { - qerror_report(QERR_QMP_BAD_INPUT_OBJECT_MEMBER, "arguments", "object"); - goto err_input; } else { args = qobject_to_qdict(obj); QINCREF(args); -- 1.7.1.359.gd0b8d