aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-01-14 21:25:11 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-01-14 21:25:11 +0100
commitd75e5630e1678211b1c95fc51594b69bcd85311a (patch)
treecd3a8e70728898f28112e43980c01389fd7b2634 /src
parent86eb99482e04b18d4890c737fc6155fde52f8d73 (diff)
Close fds[FD_W] after dup2()
Diffstat (limited to 'src')
-rw-r--r--src/grab.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/grab.c b/src/grab.c
index 96b5d9f..7b7a16c 100644
--- a/src/grab.c
+++ b/src/grab.c
@@ -447,6 +447,7 @@ getfstream(int argc, char *argv[argc])
close(fds[FD_R]);
if (dup2(fds[FD_W], STDOUT_FILENO) == -1)
die("dup2");
+ close(fds[FD_W]);
if (!(args = malloc(len * sizeof(char *))))
die("malloc");