Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_command.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 4a3aa26d7e..dd7ea0941d 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6928,7 +6928,7 @@ qemuBuildIOMMUCommandLine(virCommandPtr cmd,
const virDomainDef *def,
virQEMUCapsPtr qemuCaps)
{
- virBuffer opts = VIR_BUFFER_INITIALIZER;
+ VIR_AUTOCLEAN(virBuffer) opts = VIR_BUFFER_INITIALIZER;
const virDomainIOMMUDef *iommu = def->iommu;
if (!iommu)
@@ -6970,7 +6970,6 @@ qemuBuildIOMMUCommandLine(virCommandPtr cmd,
virCommandAddArg(cmd, "-device");
virCommandAddArgBuffer(cmd, &opts);
- virBufferFreeAndReset(&opts);
return 0;
}
--
2.21.0