mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +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 used to be commit 173f29a1d8
)
This commit is contained in:
parent
1ee3a7419e
commit
a71b913571
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user