提交 d68b97c8 编写于 作者: M Michal Privoznik 提交者: Eric Blake

qemu: Unlink temporary file on failure

Although virFDStreamOpenFile will unlink it once opened, when we hit
error path, we must unlink it by hand.
上级 de5494d8
......@@ -2931,7 +2931,10 @@ qemuDomainScreenshot(virDomainPtr dom,
endjob:
VIR_FORCE_CLOSE(tmp_fd);
VIR_FREE(tmp);
if (tmp) {
unlink(tmp);
VIR_FREE(tmp);
}
if (qemuDomainObjEndJob(driver, vm) == 0)
vm = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册