mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05: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:
1 parent
de4d70873a
commit
d6644013d2
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user