summaryrefslogtreecommitdiff
path: root/source3/torture/torture.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/torture/torture.c')
-rw-r--r--source3/torture/torture.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index d8942e42b9..25b042177d 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -294,15 +294,6 @@ static bool torture_open_connection_share(struct cli_state **c,
return True;
}
-void torture_open_connection_free_unclist(char **unc_list)
-{
- if (unc_list!=NULL)
- {
- SAFE_FREE(unc_list[0]);
- SAFE_FREE(unc_list);
- }
-}
-
bool torture_open_connection(struct cli_state **c, int conn_index)
{
char **unc_list = NULL;
@@ -311,7 +302,7 @@ bool torture_open_connection(struct cli_state **c, int conn_index)
if (use_multishare_conn==True) {
char *h, *s;
- unc_list = file_lines_load(multishare_conn_fname, &num_unc_names, 0);
+ unc_list = file_lines_load(multishare_conn_fname, &num_unc_names, 0, NULL);
if (!unc_list || num_unc_names <= 0) {
printf("Failed to load unc names list from '%s'\n", multishare_conn_fname);
exit(1);
@@ -321,14 +312,14 @@ bool torture_open_connection(struct cli_state **c, int conn_index)
NULL, &h, &s)) {
printf("Failed to parse UNC name %s\n",
unc_list[conn_index % num_unc_names]);
- torture_open_connection_free_unclist(unc_list);
+ TALLOC_FREE(unc_list);
exit(1);
}
result = torture_open_connection_share(c, h, s);
/* h, s were copied earlier */
- torture_open_connection_free_unclist(unc_list);
+ TALLOC_FREE(unc_list);
return result;
}