From a10514072f27ff9f4a6ab308b3bccfd4628ef2aa Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 9 Feb 2023 15:03:45 +0000 Subject: Add sals, several refactors Signed-off-by: Laurent Bercot --- src/libenvexec/envdir_noclamp.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/libenvexec/envdir_noclamp.c') diff --git a/src/libenvexec/envdir_noclamp.c b/src/libenvexec/envdir_noclamp.c index 0741c9d..f0e6796 100644 --- a/src/libenvexec/envdir_noclamp.c +++ b/src/libenvexec/envdir_noclamp.c @@ -93,11 +93,7 @@ int envdir_internal_noclamp (char const *path, stralloc *modifs, unsigned int op errfd: fd_close(fd) ; err: - { - int e = errno ; - dir_close(dir) ; - if (wasnull) stralloc_free(modifs) ; else modifs->len = modifbase ; - errno = e ; - return -1 ; - } + dir_close(dir) ; + if (wasnull) stralloc_free(modifs) ; else modifs->len = modifbase ; + return -1 ; } -- cgit v1.2.3