When formatting qemuCaps XML, the <cpudata/> element is
misaligned. This is because it contains multiple lines and
virBufferAsprintf() does not expect that. Switch to
virBufferAddStr() which does.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index cf8f33475c..30b396d32d 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -4756,7 +4756,7 @@ virQEMUCapsFormatCache(virQEMUCaps *qemuCaps)
if (qemuCaps->cpuData) {
g_autofree char * cpudata = virCPUDataFormat(qemuCaps->cpuData);
- virBufferAsprintf(&buf, "%s", cpudata);
+ virBufferAddStr(&buf, cpudata);
}
virBufferAsprintf(&buf, "<arch>%s</arch>\n",
--
2.35.1