diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 03a8056d9e..bf16d71f9a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3486,12 +3486,13 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def, unsigned long long memsize = virDomainNumaGetNodeMemorySize(def->numa, cell); + if (virAsprintf(&alias, "ram-node%zu", cell) < 0) + goto cleanup; + *backendStr = NULL; mem.size = memsize; mem.targetNode = cell; - - if (virAsprintf(&alias, "ram-node%zu", cell) < 0) - goto cleanup; + mem.info.alias = alias; if ((rc = qemuBuildMemoryBackendStr(&props, &backendType, cfg, priv->qemuCaps, def, &mem, priv->autoNodeset, false)) < 0)