aboutsummaryrefslogtreecommitdiff
path: root/hw/mem/pc-dimm.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/mem/pc-dimm.c')
-rw-r--r--hw/mem/pc-dimm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
index 9d3f0b9691..c30351070b 100644
--- a/hw/mem/pc-dimm.c
+++ b/hw/mem/pc-dimm.c
@@ -179,9 +179,8 @@ static void pc_dimm_realize(DeviceState *dev, Error **errp)
error_setg(errp, "'" PC_DIMM_MEMDEV_PROP "' property is not set");
return;
} else if (host_memory_backend_is_mapped(dimm->hostmem)) {
- char *path = object_get_canonical_path_component(OBJECT(dimm->hostmem));
- error_setg(errp, "can't use already busy memdev: %s", path);
- g_free(path);
+ error_setg(errp, "can't use already busy memdev: %s",
+ object_get_canonical_path_component(OBJECT(dimm->hostmem)));
return;
}
if (((nb_numa_nodes > 0) && (dimm->node >= nb_numa_nodes)) ||