diff options
author | Helmut Grohne <helmut@subdivi.de> | 2024-05-25 10:35:49 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2024-05-25 10:35:49 +0200 |
commit | 0256e324c7befaf5e3ec43fb5ac7af6aca220225 (patch) | |
tree | 81d1162975dbf995c11e92393fabf7095c6a9259 | |
parent | c5c9fe325782a790d563a0a8b1cf62a855a50d81 (diff) | |
download | python-linuxnamespaces-0256e324c7befaf5e3ec43fb5ac7af6aca220225.tar.gz |
examples/chrootfuse.py: fix file descriptor leak
Fixes: f01c7690de8e ("add example chrootfuse2fs.py")
-rwxr-xr-x | examples/chrootfuse.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/chrootfuse.py b/examples/chrootfuse.py index ef67e8a..93a9da0 100755 --- a/examples/chrootfuse.py +++ b/examples/chrootfuse.py @@ -50,6 +50,7 @@ def main() -> None: "squashfs": "squashfuse", }[args.fstype] os.execlp(driver, driver, str(args.fsimage), "/dev/fd/%d" % fds[0]) + childsock.close() linuxnamespaces.unshare( linuxnamespaces.CloneFlags.NEWUSER | linuxnamespaces.CloneFlags.NEWNS ) |