diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-01-14 21:25:11 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-01-14 21:25:11 +0100 |
commit | d75e5630e1678211b1c95fc51594b69bcd85311a (patch) | |
tree | cd3a8e70728898f28112e43980c01389fd7b2634 /src | |
parent | 86eb99482e04b18d4890c737fc6155fde52f8d73 (diff) |
Close fds[FD_W] after dup2()
Diffstat (limited to 'src')
-rw-r--r-- | src/grab.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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"); |