diff options
author | delphij <delphij@FreeBSD.org> | 2016-05-08 09:27:29 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2016-05-08 09:27:29 +0000 |
commit | c9fc394354f4b2b3f4ef16540101e0063bdb9d84 (patch) | |
tree | 20d41b68a6683e2527c71bf10d43c8b6c66c0eed | |
parent | 3c98cb6b19e2270fd5235eb16a8ae98de4fb0b5f (diff) | |
download | FreeBSD-src-c9fc394354f4b2b3f4ef16540101e0063bdb9d84.zip FreeBSD-src-c9fc394354f4b2b3f4ef16540101e0063bdb9d84.tar.gz |
Apply upstream fix 11edb37a71851b5bcbd4e51ca6ad3dcbf57e9761:
Revert: Don't close stdin...
-rw-r--r-- | src/magic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/magic.c b/src/magic.c index 315a944..8cf6269 100644 --- a/src/magic.c +++ b/src/magic.c @@ -346,7 +346,7 @@ private void close_and_restore(const struct magic_set *ms, const char *name, int fd, const struct stat *sb) { - if (name == NULL) + if (fd == STDIN_FILENO || name == NULL) return; (void) close(fd); |