qemu: Fix FD leak in qemudStartVMDaemon

The logfile FD is dup2'ed in __virExec in the child. The FD needs to
be closed in the parent, otherwise it leaks.
This commit is contained in:
Matthias Bolte
2010-03-18 23:45:11 +01:00
parent 336fd879c0
commit caad0a8783
+3
View File
@@ -2975,6 +2975,9 @@ static int qemudStartVMDaemon(virConnectPtr conn,
if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0)
goto abort;
if (logfile != -1)
close(logfile);
return 0;
cleanup: