mirror of
https://github.com/samba-team/samba.git
synced 2025-11-08 16:23:49 +03:00
r3075: Initialise (and check for intialisation) of the private pointer to
ensure we don't segfault on the cleanup from an incomplete schannel bind. Andrew Bartlett
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
3759128bd3
commit
173f29a1d8
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user