summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/driver/slbt_host_params.c19
-rw-r--r--src/internal/slibtool_driver_impl.h6
2 files changed, 25 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));
}
diff --git a/src/internal/slibtool_driver_impl.h b/src/internal/slibtool_driver_impl.h
index 2c5ea39..631a1b6 100644
--- a/src/internal/slibtool_driver_impl.h
+++ b/src/internal/slibtool_driver_impl.h
@@ -112,6 +112,12 @@ struct slbt_host_strs {
char * windres;
char * dlltool;
char * mdso;
+ char ** ar_argv;
+ char ** as_argv;
+ char ** ranlib_argv;
+ char ** windres_argv;
+ char ** dlltool_argv;
+ char ** mdso_argv;
};
struct slbt_obj_list {