diff options
Diffstat (limited to 'qom/object_interfaces.c')
-rw-r--r-- | qom/object_interfaces.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c index ab5da35e4f..393189024f 100644 --- a/qom/object_interfaces.c +++ b/qom/object_interfaces.c @@ -170,6 +170,7 @@ int user_creatable_add_opts_foreach(void *opaque, QemuOpts *opts, Error **errp) { bool (*type_predicate)(const char *) = opaque; Object *obj = NULL; + Error *err = NULL; const char *type; type = qemu_opt_get(opts, "qom-type"); @@ -178,8 +179,9 @@ int user_creatable_add_opts_foreach(void *opaque, QemuOpts *opts, Error **errp) return 0; } - obj = user_creatable_add_opts(opts, errp); + obj = user_creatable_add_opts(opts, &err); if (!obj) { + error_report_err(err); return -1; } object_unref(obj); |