mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +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);
|
||||
VIR_FREE(tmp);
|
||||
if (tmp) {
|
||||
unlink(tmp);
|
||||
VIR_FREE(tmp);
|
||||
}
|
||||
|
||||
if (qemuDomainObjEndJob(driver, vm) == 0)
|
||||
vm = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user