summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-16 03:25:19 +0000
committermidipix <writeonce@midipix.org>2024-02-16 03:25:19 +0000
commit5ddd2aa439b1ce23b4322cf0abd89a49a8533606 (patch)
treed5944da8fb12e076b56e0d49f9b7577f90918246 /src/driver
parent35000fa828ed7c786c3e6fb0379edd968663cd02 (diff)
downloadslibtool-5ddd2aa439b1ce23b4322cf0abd89a49a8533606.tar.bz2
slibtool-5ddd2aa439b1ce23b4322cf0abd89a49a8533606.tar.xz
driver: internals: allows storing a distinct argument vector for each tool.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/slbt_host_params.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/driver/slbt_host_params.c b/src/driver/slbt_host_params.c
index 690ca30..9fe8153 100644
--- a/src/driver/slbt_host_params.c
+++ b/src/driver/slbt_host_params.c
@@ -485,6 +485,18 @@ int slbt_init_host_params(
return 0;
}
+static void slbt_free_host_tool_argv(char ** argv)
+{
+ char ** parg;
+
+ if (!argv)
+ return;
+
+ for (parg=argv; *parg; parg++)
+ free(*parg);
+
+ free(argv);
+}
void slbt_free_host_params(struct slbt_host_strs * host)
{
@@ -515,6 +527,13 @@ void slbt_free_host_params(struct slbt_host_strs * host)
if (host->mdso)
free(host->mdso);
+ slbt_free_host_tool_argv(host->ar_argv);
+ slbt_free_host_tool_argv(host->as_argv);
+ slbt_free_host_tool_argv(host->ranlib_argv);
+ slbt_free_host_tool_argv(host->windres_argv);
+ slbt_free_host_tool_argv(host->dlltool_argv);
+ slbt_free_host_tool_argv(host->mdso_argv);
+
memset(host,0,sizeof(*host));
}