]> sourceware.org Git - glibc.git/commitdiff
Linux: Avoid closing -1 on failure in __closefrom_fallback
authorFlorian Weimer <fweimer@redhat.com>
Fri, 24 Sep 2021 17:51:41 +0000 (19:51 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 24 Sep 2021 17:51:52 +0000 (19:51 +0200)
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
sysdeps/unix/sysv/linux/closefrom_fallback.c

index 9cca55653a60b5af1dd0630334a47bf80afffcee..f215fd2c092aa88a078d44dd6e8277450b3e4064 100644 (file)
@@ -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];
This page took 0.046963 seconds and 5 git commands to generate.