1
0
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:
Andrew Bartlett 2004-10-20 02:10:46 +00:00 committed by Gerald (Jerry) Carter
parent 1ee3a7419e
commit a71b913571
2 changed files with 8 additions and 2 deletions

View File

@ -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;
}
}
/*

View File

@ -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;
}