diff options
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/qmp-input-visitor.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/qapi/qmp-input-visitor.c b/qapi/qmp-input-visitor.c index e6b6152e08..b4013ccfc5 100644 --- a/qapi/qmp-input-visitor.c +++ b/qapi/qmp-input-visitor.c @@ -77,11 +77,8 @@ static void qmp_input_push(QmpInputVisitor *qiv, const QObject *obj, Error **err static void qmp_input_pop(QmpInputVisitor *qiv, Error **errp) { + assert(qiv->nb_stack > 0); qiv->nb_stack--; - if (qiv->nb_stack < 0) { - error_set(errp, QERR_BUFFER_OVERRUN); - return; - } } static void qmp_input_start_struct(Visitor *v, void **obj, const char *kind, |