aboutsummaryrefslogtreecommitdiff
path: root/hw/core/machine-qmp-cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/core/machine-qmp-cmds.c')
-rw-r--r--hw/core/machine-qmp-cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 2c5da8413d..963088b798 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -315,7 +315,7 @@ static int query_memdev(Object *obj, void *opaque)
m->value = g_malloc0(sizeof(*m->value));
- m->value->id = object_get_canonical_path_component(obj);
+ m->value->id = g_strdup(object_get_canonical_path_component(obj));
m->value->has_id = !!m->value->id;
m->value->size = object_property_get_uint(obj, "size",