mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
qemu: Unlink temporary file on failure
Although virFDStreamOpenFile will unlink it once opened, when we hit error path, we must unlink it by hand.
This commit is contained in:
parent
de5494d8a4
commit
d68b97c8a6
@ -2931,7 +2931,10 @@ qemuDomainScreenshot(virDomainPtr dom,
|
||||
|
||||
endjob:
|
||||
VIR_FORCE_CLOSE(tmp_fd);
|
||||
if (tmp) {
|
||||
unlink(tmp);
|
||||
VIR_FREE(tmp);
|
||||
}
|
||||
|
||||
if (qemuDomainObjEndJob(driver, vm) == 0)
|
||||
vm = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user