26 lines
642 B
Diff
26 lines
642 B
Diff
From c8581da4c79cfc3fe52bb6c398497ff3a9986abd Mon Sep 17 00:00:00 2001
|
|
From: Christos Zoulas <christos@zoulas.com>
|
|
Date: Mon, 8 Feb 2016 02:20:36 +0000
|
|
Subject: [PATCH] doesn't matter if it is stdin; if we opened it, we close it.
|
|
|
|
---
|
|
magic.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git src/magic.c src/magic.c
|
|
index 30faa8a..c3ceb50 100644
|
|
--- src/magic.c
|
|
+++ 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 (fd == STDIN_FILENO || name == NULL)
|
|
+ if (name == NULL)
|
|
return;
|
|
(void) close(fd);
|
|
|
|
--
|
|
2.6.6
|
|
|