summaryrefslogtreecommitdiff
path: root/source4/torture/smbtorture.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-04-24 16:00:17 -0700
committerJeremy Allison <jra@samba.org>2017-05-05 15:52:11 +0200
commit6341d3d59f2cee3478e02eb0a6f6c96f31bda513 (patch)
tree2d4aac473f94eaddb9bc2d37a92ab91badb66990 /source4/torture/smbtorture.c
parentf18cc16cf1c5dc089e038cd894ee42890e377d48 (diff)
downloadsamba-6341d3d59f2cee3478e02eb0a6f6c96f31bda513.tar.gz
s4: torture: Add a TALLOC_CTX * to torture_parse_target().
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'source4/torture/smbtorture.c')
-rw-r--r--source4/torture/smbtorture.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 5038a47067f..13fe203ff64 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -150,7 +150,9 @@ bool torture_run_named_tests(struct torture_context *torture, const char *name,
return ret;
}
-bool torture_parse_target(struct loadparm_context *lp_ctx, const char *target)
+bool torture_parse_target(TALLOC_CTX *ctx,
+ struct loadparm_context *lp_ctx,
+ const char *target)
{
char *host = NULL, *share = NULL;
struct dcerpc_binding *binding_struct;
@@ -160,7 +162,7 @@ bool torture_parse_target(struct loadparm_context *lp_ctx, const char *target)
if (!smbcli_parse_unc(target, NULL, &host, &share)) {
const char *h;
- status = dcerpc_parse_binding(talloc_autofree_context(), target, &binding_struct);
+ status = dcerpc_parse_binding(ctx, target, &binding_struct);
if (NT_STATUS_IS_ERR(status)) {
d_printf("Invalid option: %s is not a valid torture target (share or binding string)\n\n", target);
return false;
@@ -679,8 +681,9 @@ int main(int argc, const char *argv[])
printf("You must specify a test to run, or 'ALL'\n");
usage(pc);
torture->results->returncode = 1;
- } else if (!torture_parse_target(cmdline_lp_ctx, argv_new[1])) {
- /* Take the target name or binding. */
+ } else if (!torture_parse_target(torture,
+ cmdline_lp_ctx, argv_new[1])) {
+ /* Take the target name or binding. */
usage(pc);
torture->results->returncode = 1;
} else {