[libvirt] [PATCH v2 02/15] qemu: Move 'done' label in qemuBuildControllerDevStr()

Andrea Bolognani abologna at redhat.com
Fri Feb 16 16:27:59 UTC 2018


Even when we skip part of the processing, we still want error
checking on the buffer.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 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 55e573b61..1ab5b0818 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;
 
-- 
2.14.3




More information about the libvir-list mailing list