summaryrefslogtreecommitdiffhomepage
path: root/src/arbits
diff options
context:
space:
mode:
Diffstat (limited to 'src/arbits')
-rw-r--r--src/arbits/slbt_archive_mapfile.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/arbits/slbt_archive_mapfile.c b/src/arbits/slbt_archive_mapfile.c
index 2bca16d..976b809 100644
--- a/src/arbits/slbt_archive_mapfile.c
+++ b/src/arbits/slbt_archive_mapfile.c
@@ -67,6 +67,7 @@ static int slbt_ar_create_mapfile_impl(
const char * path,
mode_t mode)
{
+ int ret;
struct slbt_archive_meta_impl * mctx;
const struct slbt_driver_ctx * dctx;
struct slbt_fd_ctx fdctx;
@@ -91,8 +92,14 @@ static int slbt_ar_create_mapfile_impl(
fdout = fdctx.fdout;
}
- return slbt_ar_output_mapfile_impl(
+ ret = slbt_ar_output_mapfile_impl(
dctx,mctx,fdout);
+
+ if (path) {
+ close(fdout);
+ }
+
+ return ret;
}