提交 650da0e9 编写于 作者: M Michal Privoznik

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.
上级 fb98da00
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册