From 70a7b25c6cef8574a8e00cf99db1bf9f03550c78 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 19 Feb 2018 12:48:38 -0500 Subject: [PATCH] qapi: Tighten qmp_input_end_list() The only way that qmp_input_pop() will set errp is if a dictionary was the most recent thing pushed. Since we don't have any push(struct)/pop(list) or push(list)/pop(struct) mismatches (such a mismatch is a programming bug), we therefore cannot set errp inside qmp_input_end_list(). Make this obvious by using &error_abort. A later patch will then remove the errp parameter of qmp_input_pop(), but that will first require the larger task of splitting visit_end_struct(). Backports commit bdd8e6b5d8a9def83d491a3f41c10424fc366258 from qemu --- qemu/qapi/qmp-input-visitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/qapi/qmp-input-visitor.c b/qemu/qapi/qmp-input-visitor.c index d94eff15..a036d369 100644 --- a/qemu/qapi/qmp-input-visitor.c +++ b/qemu/qapi/qmp-input-visitor.c @@ -206,7 +206,7 @@ static void qmp_input_end_list(Visitor *v, Error **errp) { QmpInputVisitor *qiv = to_qiv(v); - qmp_input_pop(qiv, errp); + qmp_input_pop(qiv, &error_abort); } static void qmp_input_get_next_type(Visitor *v, int *kind, const int *qobjects,