mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
json: Assert json_parser_parse() consumes all tokens on success
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180823164025.12553-47-armbru@redhat.com>
This commit is contained in:
parent
f9277915ee
commit
5d50113cf6
1 changed files with 1 additions and 0 deletions
|
@ -544,6 +544,7 @@ QObject *json_parser_parse(GQueue *tokens, va_list *ap, Error **errp)
|
|||
QObject *result;
|
||||
|
||||
result = parse_value(&ctxt, ap);
|
||||
assert(ctxt.err || g_queue_is_empty(ctxt.buf));
|
||||
|
||||
error_propagate(errp, ctxt.err);
|
||||
|
||||
|
|
Loading…
Reference in a new issue