Linux: Avoid closing -1 on failure in __closefrom_fallback

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
This commit is contained in:
Florian Weimer 2021-09-24 19:51:41 +02:00
parent 91e92272ca
commit 5ad9d62c3b

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