summaryrefslogtreecommitdiffhomepage
path: root/src/logic/linkcmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic/linkcmd')
-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)