public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/unnest] Linux: Avoid closing -1 on failure in __closefrom_fallback
@ 2021-09-24 20:12 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-09-24 20:12 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5ad9d62c3b7438c70452d6a9b2c7810f9f28bf32

commit 5ad9d62c3b7438c70452d6a9b2c7810f9f28bf32
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Sep 24 19:51:41 2021 +0200

    Linux: Avoid closing -1 on failure in __closefrom_fallback
    
    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Diff:
---
 sysdeps/unix/sysv/linux/closefrom_fallback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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];


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-24 20:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-24 20:12 [glibc/maskray/unnest] Linux: Avoid closing -1 on failure in __closefrom_fallback Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).