mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-06 21:15:22 +00:00
qemu_ga: Don't overwrite errors on FSThaw
We can tell qemuDomainSnapshotFSThaw if we want it to report errors or
not. However, if we don't want to and an error has been already set by
previous qemuReportError() we must keep copy of that error not just a
pointer to it. Otherwise, it get overwritten if FSThaw reports an error.
(cherry picked from commit 650da0e99c
)
This commit is contained in:
parent
c5031e2d1d
commit
f25ef09fb5
@ -9636,16 +9636,13 @@ qemuDomainSnapshotFSThaw(struct qemud_driver *driver,
|
||||
|
||||
qemuDomainObjEnterAgent(driver, vm);
|
||||
if (!report)
|
||||
err = virGetLastError();
|
||||
err = virSaveLastError();
|
||||
thawed = qemuAgentFSThaw(priv->agent);
|
||||
if (!report) {
|
||||
if (err)
|
||||
virResetError(err);
|
||||
else
|
||||
virResetLastError();
|
||||
}
|
||||
if (!report)
|
||||
virSetError(err);
|
||||
qemuDomainObjExitAgent(driver, vm);
|
||||
|
||||
virFreeError(err);
|
||||
return thawed;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user