summaryrefslogtreecommitdiff
path: root/src/libenvexec
diff options
context:
space:
mode:
Diffstat (limited to 'src/libenvexec')
-rw-r--r--src/libenvexec/envdir_clamp.c10
-rw-r--r--src/libenvexec/envdir_noclamp.c10
2 files changed, 6 insertions, 14 deletions
diff --git a/src/libenvexec/envdir_clamp.c b/src/libenvexec/envdir_clamp.c
index b63ed97..092ede1 100644
--- a/src/libenvexec/envdir_clamp.c
+++ b/src/libenvexec/envdir_clamp.c
@@ -75,11 +75,7 @@ int envdir_internal_clamp (char const *path, stralloc *modifs, unsigned int opti
return n ;
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 ;
}
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 ;
}