aboutsummaryrefslogtreecommitdiff
path: root/qom
diff options
context:
space:
mode:
Diffstat (limited to 'qom')
-rw-r--r--qom/object.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/qom/object.c b/qom/object.c
index f28d703826..48053281ef 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -1612,12 +1612,16 @@ static void property_get_str(Object *obj, Visitor *v, void *opaque,
{
StringProperty *prop = opaque;
char *value;
+ Error *err = NULL;
- value = prop->get(obj, errp);
- if (value) {
- visit_type_str(v, &value, name, errp);
- g_free(value);
+ value = prop->get(obj, &err);
+ if (err) {
+ error_propagate(errp, err);
+ return;
}
+
+ visit_type_str(v, &value, name, errp);
+ g_free(value);
}
static void property_set_str(Object *obj, Visitor *v, void *opaque,