summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/session_key.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/source4/torture/rpc/session_key.c b/source4/torture/rpc/session_key.c
index 431897ac77..1d3199944d 100644
--- a/source4/torture/rpc/session_key.c
+++ b/source4/torture/rpc/session_key.c
@@ -148,6 +148,7 @@ static bool test_secrets(struct torture_context *torture, const void *_data)
struct dcerpc_binding *binding;
const struct secret_settings *settings =
(const struct secret_settings *)_data;
+ NTSTATUS status;
lp_set_cmdline(torture->lp_ctx, "ntlmssp client:keyexchange", settings->keyexchange?"True":"False");
lp_set_cmdline(torture->lp_ctx, "ntlmssp_client:ntlm2", settings->ntlm2?"True":"False");
@@ -158,24 +159,28 @@ static bool test_secrets(struct torture_context *torture, const void *_data)
binding->flags |= settings->bindoptions;
- torture_assert_ntstatus_ok(torture,
- dcerpc_pipe_connect_b(torture, &p, binding,
- &ndr_table_lsarpc,
- cmdline_credentials,
- torture->ev,
- torture->lp_ctx),
- "connect");
+ status = dcerpc_pipe_connect_b(torture, &p, binding,
+ &ndr_table_lsarpc,
+ cmdline_credentials,
+ torture->ev,
+ torture->lp_ctx);
+
+ torture_assert_ntstatus_ok(torture, status, "connect");
if (!test_lsa_OpenPolicy2(p, torture, &handle)) {
+ talloc_free(p);
return false;
}
torture_assert(torture, handle, "OpenPolicy2 failed. This test cannot run against this server");
if (!test_CreateSecret_basic(p, torture, handle)) {
+ talloc_free(p);
return false;
}
+ talloc_free(p);
+
return true;
}