summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/auth/schannel.c6
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/source4/libcli/auth/schannel.c b/source4/libcli/auth/schannel.c
index aa89e7b84f..2e752f0172 100644
--- a/source4/libcli/auth/schannel.c
+++ b/source4/libcli/auth/schannel.c
@@ -278,8 +278,10 @@ NTSTATUS schannel_sign_packet(struct schannel_state *state,
*/
void schannel_end(struct schannel_state **state)
{
- talloc_destroy((*state)->mem_ctx);
- (*state) = NULL;
+ if (*state) {
+ talloc_destroy((*state)->mem_ctx);
+ (*state) = NULL;
+ }
}
/*
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index 7bb871811a..700a2a40fb 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -279,9 +279,13 @@ static NTSTATUS dcerpc_schannel_start(struct gensec_security *gensec_security)
static NTSTATUS dcerpc_schannel_server_start(struct gensec_security *gensec_security)
{
NTSTATUS status;
+ struct dcerpc_schannel_state *dce_schan_state;
status = dcerpc_schannel_start(gensec_security);
+ dce_schan_state = gensec_security->private_data;
+ dce_schan_state->schannel_state = NULL;
+
if (!NT_STATUS_IS_OK(status)) {
return status;
}