aboutsummaryrefslogtreecommitdiffstats
path: root/src/fcntl
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-31 03:28:13 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-31 03:28:13 +0100
commit1cd2d4e854eed1d56634f074fb6924c67501fe78 (patch)
treec36fb8cee87a72c0d1fe9431672000a32098a782 /src/fcntl
parentfix DAEMONISE_KEEP_FDS (diff)
downloadslibc-1cd2d4e854eed1d56634f074fb6924c67501fe78.tar.gz
slibc-1cd2d4e854eed1d56634f074fb6924c67501fe78.tar.bz2
slibc-1cd2d4e854eed1d56634f074fb6924c67501fe78.tar.xz
m bug fix: reopen: closed wrong fd
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/fcntl')
-rw-r--r--src/fcntl/reopen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fcntl/reopen.c b/src/fcntl/reopen.c
index e689e58..5903e1b 100644
--- a/src/fcntl/reopen.c
+++ b/src/fcntl/reopen.c
@@ -74,6 +74,6 @@ int reopen(int fd, int oflag)
return -1;
if (dup2(r, fd) == -1)
return saved_errno = errno, close(r), errno = saved_errno, -1;
- return close(fd), 0;
+ return close(r), 0;
}