The code specifies driver->cacheDir as the format string,
but it usually doesn't contain '%s', so the subsequent
argument, "/qemu.mem.XXXXXX", is always ignored.
The patch fixes the misuse.
---
src/qemu/qemu_driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index bb1079e..843f827 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9033,7 +9033,7 @@ qemudDomainMemoryPeek (virDomainPtr dom,
goto endjob;
}
- if (virAsprintf(&tmp, driver->cacheDir, "/qemu.mem.XXXXXX") < 0)
{
+ if (virAsprintf(&tmp, "%s/qemu.mem.XXXXXX", driver->cacheDir) <
0) {
virReportOOMError();
goto endjob;
}
--
1.6.5.2