mirror of
https://repo.or.cz/socat.git
synced 2025-07-09 05:46:32 +00:00
Option stderr leaked a temporary FD into child process
This commit is contained in:
parent
80f4aa8bcd
commit
b3dde9a009
2 changed files with 4 additions and 0 deletions
1
error.c
1
error.c
|
@ -472,6 +472,7 @@ int diag_dup(void) {
|
|||
return -1;
|
||||
}
|
||||
newfd = dup(fileno(diagopts.logfile));
|
||||
Fcntl_l(newfd, F_SETFD, FD_CLOEXEC);
|
||||
if (diagopts.logfile != stderr) {
|
||||
fclose(diagopts.logfile);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue