mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user