mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
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:
parent
de4d70873a
commit
d6644013d2
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user