From 4caa489d1337c1a72d2e36185e4586ad246b98e1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 12 Mar 2015 13:58:02 +0100 Subject: [PATCH] qdev-monitor: Propagate errors through set_property() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Andreas Färber --- qdev-monitor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qdev-monitor.c b/qdev-monitor.c index 12d8f6b969..c7b00e046a 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -156,8 +156,7 @@ static int set_property(void *opaque, const char *name, const char *value, object_property_parse(obj, value, name, &err); if (err != NULL) { - qerror_report_err(err); - error_free(err); + error_propagate(errp, err); return -1; } return 0; @@ -592,7 +591,8 @@ DeviceState *qdev_device_add(QemuOpts *opts) } /* set properties */ - if (qemu_opt_foreach(opts, set_property, dev, NULL)) { + if (qemu_opt_foreach(opts, set_property, dev, &err)) { + qerror_report_err(err); object_unparent(OBJECT(dev)); object_unref(OBJECT(dev)); return NULL; -- 2.11.4.GIT