aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/compat.c')
-rw-r--r--src/common/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 42602fb3a3..07d961812c 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -112,7 +112,7 @@ tor_open_cloexec(const char *path, int flags, unsigned mode)
int fd = open(path, flags, mode);
#ifdef FD_CLOEXEC
if (fd >= 0)
- fcntl(s, F_SETFD, FD_CLOEXEC);
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
#endif
return fd;
#endif