mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-11-03 04:17:18 -05:00
Unconditionally close allocated stderr FDs
This commit is contained in:
parent
ae85c26cae
commit
2cdda45c16
@ -294,8 +294,7 @@ openResource(stream_t stream, const char *filename, int *popenFlag,
|
||||
}
|
||||
|
||||
dup2(fd, fileno(stderr));
|
||||
if (fd > 2)
|
||||
close(fd);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
fflush(NULL);
|
||||
@ -316,7 +315,7 @@ openResource(stream_t stream, const char *filename, int *popenFlag,
|
||||
if (cfg_get_program_quiet_stderr())
|
||||
dup2(stderr_fd, fileno(stderr));
|
||||
|
||||
if (stderr_fd > 2)
|
||||
if (stderr_fd != -1)
|
||||
close(stderr_fd);
|
||||
|
||||
return (filep);
|
||||
|
Loading…
Reference in New Issue
Block a user