[PATCH 10/37] qemuFDPassTransferMonitor: Close local copy of the FD as soon as it's passed to qemu

Peter Krempa posted 37 patches 3 years, 9 months ago
[PATCH 10/37] qemuFDPassTransferMonitor: Close local copy of the FD as soon as it's passed to qemu
Posted by Peter Krempa 3 years, 9 months ago
We don't want to keep the FDs open more than we need to.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_fd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qemu/qemu_fd.c b/src/qemu/qemu_fd.c
index cbdf1c938f..6e3a7ca491 100644
--- a/src/qemu/qemu_fd.c
+++ b/src/qemu/qemu_fd.c
@@ -276,6 +276,7 @@ qemuFDPassTransferMonitor(qemuFDPass *fdpass,
                 return -1;
         }

+        VIR_FORCE_CLOSE(fdpass->fds[i].fd);
         fdpass->passed = true;
     }

-- 
2.35.1
Re: [PATCH 10/37] qemuFDPassTransferMonitor: Close local copy of the FD as soon as it's passed to qemu
Posted by Ján Tomko 3 years, 9 months ago
On a Tuesday in 2022, Peter Krempa wrote:
>We don't want to keep the FDs open more than we need to.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/qemu/qemu_fd.c | 1 +
> 1 file changed, 1 insertion(+)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano