mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00: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:
parent
336fd879c0
commit
caad0a8783
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user