summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libudev/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libudev/util.c b/src/libudev/util.c
index 1d57a01567..d3982b92e1 100644
--- a/src/libudev/util.c
+++ b/src/libudev/util.c
@@ -4586,7 +4586,7 @@ int fopen_temporary(const char *path, FILE **_f, char **_temp_path) {
fd = mkostemp(t, O_WRONLY|O_CLOEXEC);
#else
fd = mkstemp(t);
- fcntl(t, F_SETFD, FD_CLOEXEC);
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
#endif
if (fd < 0) {
free(t);