summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/minidentd/minidentd.c1
-rw-r--r--src/sbearssl/sbearssl_ta_readdir.c18
2 files changed, 8 insertions, 11 deletions
diff --git a/src/minidentd/minidentd.c b/src/minidentd/minidentd.c
index 6d0f6a0..67ce7eb 100644
--- a/src/minidentd/minidentd.c
+++ b/src/minidentd/minidentd.c
@@ -12,6 +12,7 @@
#include <skalibs/buffer.h>
#include <skalibs/strerr2.h>
#include <skalibs/stralloc.h>
+#include <skalibs/env.h>
#include <skalibs/djbunix.h>
#include <skalibs/sgetopt.h>
#include <skalibs/tai.h>
diff --git a/src/sbearssl/sbearssl_ta_readdir.c b/src/sbearssl/sbearssl_ta_readdir.c
index 829d7a6..4093bcf 100644
--- a/src/sbearssl/sbearssl_ta_readdir.c
+++ b/src/sbearssl/sbearssl_ta_readdir.c
@@ -48,16 +48,12 @@ int sbearssl_ta_readdir (char const *dirfn, genalloc *taga, stralloc *tasa)
return 0 ;
fail:
- {
- int e = errno ;
- dir_close(dir) ;
- genalloc_free(sbearssl_cert, &certga) ;
- stralloc_free(&certsa) ;
- if (tagawasnull) genalloc_free(sbearssl_ta, taga) ;
- else genalloc_setlen(sbearssl_ta, taga, tagabase) ;
- if (tasawasnull) stralloc_free(tasa) ;
- else tasa->len = tasabase ;
- errno = e ;
- }
+ dir_close(dir) ;
+ genalloc_free(sbearssl_cert, &certga) ;
+ stralloc_free(&certsa) ;
+ if (tagawasnull) genalloc_free(sbearssl_ta, taga) ;
+ else genalloc_setlen(sbearssl_ta, taga, tagabase) ;
+ if (tasawasnull) stralloc_free(tasa) ;
+ else tasa->len = tasabase ;
return -1 ;
}