mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 11:52:20 +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)
|
if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0)
|
||||||
goto abort;
|
goto abort;
|
||||||
|
|
||||||
|
if (logfile != -1)
|
||||||
|
close(logfile);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user