Fix a misuse of virAsprintf in qemudDomainMemoryPeek

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.
This commit is contained in:
Ryota Ozaki 2010-05-14 19:08:59 +09:00 committed by Eric Blake
parent de4d70873a
commit d6644013d2

View File

@ -9177,7 +9177,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;
}