summaryrefslogtreecommitdiff
path: root/src/logic/linkcmd/slbt_linkcmd_argv.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-11 04:22:39 +0000
committermidipix <writeonce@midipix.org>2024-02-11 04:22:39 +0000
commit9c528fe2253792ffb6ae44c807f70ba4868b65fc (patch)
tree96ae82571a649940e7b317cbe02f1744d63edc1f /src/logic/linkcmd/slbt_linkcmd_argv.c
parent4964fd6881d1fa97309eef90fbb646fc95ef683c (diff)
downloadslibtool-9c528fe2253792ffb6ae44c807f70ba4868b65fc.tar.bz2
slibtool-9c528fe2253792ffb6ae44c807f70ba4868b65fc.tar.xz
slbt_exec_link_adjust_argument_vector(): free unmapped files as needed.
Diffstat (limited to 'src/logic/linkcmd/slbt_linkcmd_argv.c')
-rw-r--r--src/logic/linkcmd/slbt_linkcmd_argv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/logic/linkcmd/slbt_linkcmd_argv.c b/src/logic/linkcmd/slbt_linkcmd_argv.c
index 9b36171..440be9e 100644
--- a/src/logic/linkcmd/slbt_linkcmd_argv.c
+++ b/src/logic/linkcmd/slbt_linkcmd_argv.c
@@ -296,7 +296,7 @@ int slbt_exec_link_adjust_argument_vector(
struct stat st;
size_t size;
size_t dlen;
- struct slbt_map_info * mapinfo;
+ struct slbt_map_info * mapinfo = 0;
bool fwholearchive = false;
int ret;
@@ -534,6 +534,11 @@ int slbt_exec_link_adjust_argument_vector(
}
}
}
+
+ if (mapinfo) {
+ slbt_unmap_file(mapinfo);
+ mapinfo = 0;
+ }
}
if (dctx->cctx->drvflags & SLBT_DRIVER_EXPORT_DYNAMIC)