diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -4107,14 +4107,9 @@ static int monitor_can_read(void *opaque) static void monitor_qmp_respond(Monitor *mon, QObject *rsp, Error *err, QObject *id) { - QDict *qdict = NULL; - if (err) { assert(!rsp); - qdict = qdict_new(); - qdict_put_obj(qdict, "error", qmp_build_error_object(err)); - error_free(err); - rsp = QOBJECT(qdict); + rsp = QOBJECT(qmp_error_response(err)); } if (rsp) { |