diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-09-24 19:51:41 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-09-24 19:51:52 +0200 |
commit | 5ad9d62c3b7438c70452d6a9b2c7810f9f28bf32 (patch) | |
tree | 390a3a44035d49ca3e5b45d46913df914a1d45d4 /sysdeps | |
parent | 91e92272caefad4b6156572fc41671dcbd93afe5 (diff) | |
download | glibc-5ad9d62c3b7438c70452d6a9b2c7810f9f28bf32.tar.gz glibc-5ad9d62c3b7438c70452d6a9b2c7810f9f28bf32.tar.xz glibc-5ad9d62c3b7438c70452d6a9b2c7810f9f28bf32.zip |
Linux: Avoid closing -1 on failure in __closefrom_fallback
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/closefrom_fallback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/closefrom_fallback.c b/sysdeps/unix/sysv/linux/closefrom_fallback.c index 9cca55653a..f215fd2c09 100644 --- a/sysdeps/unix/sysv/linux/closefrom_fallback.c +++ b/sysdeps/unix/sysv/linux/closefrom_fallback.c @@ -48,7 +48,7 @@ __closefrom_fallback (int from, _Bool dirfd_fallback) dirfd = __open_nocancel (FD_TO_FILENAME_PREFIX, O_RDONLY | O_DIRECTORY, 0); if (dirfd == -1) - goto err; + return false; } char buffer[1024]; |