From 3424de62883d43b533b87c88c7fac53cc7cd12ca Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Mon, 12 Feb 2018 18:46:23 +0100 Subject: [PATCH] qemu: Move 'done' label in qemuBuildControllerDevStr() Even when we skip part of the processing, we still want error checking on the buffer. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 0c6a6cbd15..d916dd179b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2801,10 +2801,10 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, if (qemuBuildDeviceAddressStr(&buf, domainDef, &def->info, qemuCaps) < 0) goto error; + done: if (virBufferCheckError(&buf) < 0) goto error; - done: *devstr = virBufferContentAndReset(&buf); return 0;