[libvirt PATCH 05/11] qemu_command: fix FD usage in qemuBuildInterfaceCommandLine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If virCommandPassFD() is called with VIR_COMMAND_PASS_FD_CLOSE_PARENT
the passed FD is closed and should not be used after that call.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/qemu/qemu_command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0eec35da16..0580feb475 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -8142,7 +8142,7 @@ qemuBuildInterfaceCommandLine(virQEMUDriverPtr driver,
         g_autofree char *fdset = NULL;
         g_autofree char *addfdarg = NULL;
 
-        virCommandPassFD(cmd, vdpafd, VIR_COMMAND_PASS_FD_CLOSE_PARENT);
+        virCommandPassFD(cmd, vdpafd, 0);
         fdset = qemuVirCommandGetFDSet(cmd, vdpafd);
         if (!fdset)
             goto cleanup;
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux