Close logfile fd after spawning qemu

* src/qemu_driver.c: avoid a leak of file descriptor when exec'ing qemu
This commit is contained in:
Ryota Ozaki 2009-09-10 11:34:14 +02:00 committed by Daniel Veillard
parent 8d4ed2ad3d
commit 32456779a1

View File

@ -2239,6 +2239,9 @@ static int qemudStartVMDaemon(virConnectPtr conn,
/* No need for 'goto cleanup' now since qemudShutdownVMDaemon does enough */
}
if (logfile != -1)
close(logfile);
return ret;
cleanup: