Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/qemu/qemu_command.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 528e11d5a0..18b3914ca9 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3588,14 +3588,13 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
{
VIR_AUTOPTR(virJSONValue) props = NULL;
VIR_AUTOFREE(char *) alias = NULL;
- int ret = -1;
int rc;
virDomainMemoryDef mem = { 0 };
unsigned long long memsize = virDomainNumaGetNodeMemorySize(def->numa,
cell);
if (virAsprintf(&alias, "ram-node%zu", cell) < 0)
- goto cleanup;
+ return -1;
mem.size = memsize;
mem.targetNode = cell;
@@ -3603,16 +3602,12 @@ qemuBuildMemoryCellBackendStr(virDomainDefPtr def,
if ((rc = qemuBuildMemoryBackendProps(&props, alias, cfg,
priv, def, &mem, false)) < 0)
- goto cleanup;
+ return -1;
if (virQEMUBuildObjectCommandlineFromJSON(buf, props) < 0)
- goto cleanup;
-
- ret = rc;
-
- cleanup:
+ return -1;
- return ret;
+ return rc;
}
--
2.19.2