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 <abologna@redhat.com>
This commit is contained in:
Andrea Bolognani 2018-02-12 18:46:23 +01:00
parent 82e43ae164
commit 3424de6288

View File

@ -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;