[PATCH] qemu: Unlink temporary file on failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Although virFDStreamOpenFile will unlink it once opened, when we hit
error path, we must unlink it by hand.
---
 src/qemu/qemu_driver.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 09b2791..d860cd2 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -2930,6 +2930,7 @@ qemuDomainScreenshot(virDomainPtr dom,
     ret = strdup("image/x-portable-pixmap");
 
 endjob:
+    unlink(tmp);
     VIR_FORCE_CLOSE(tmp_fd);
     VIR_FREE(tmp);
 
-- 
1.7.3.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]