r19480: - clear the whole session struct (only let the pid untouched)
authorStefan Metzmacher <metze@samba.org>
Tue, 24 Oct 2006 16:14:00 +0000 (16:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:21:41 +0000 (14:21 -0500)
- zero state struct

metze
(This used to be commit 97fb407a4cfcf71e95663e437cb7f638ac4028fc)

source4/libcli/smb_composite/connect.c

index 7d4960d7d56df616d51dfa008ab70fcf5b046da5..fc788d5d31df0d9dcc71fd320a617d6864655084 100644 (file)
@@ -179,6 +179,9 @@ static NTSTATUS connect_session_setup(struct composite_context *c,
                 * have been given a uid in the NTLMSSP_CHALLENGE reply. This
                 * would lead to an invalid uid in the anonymous fallback */
                state->session->vuid = 0;
+               data_blob_free(&state->session->user_session_key);
+               talloc_free(state->session->gensec);
+               state->session->gensec = NULL;
 
                state->creq = smb_composite_sesssetup_send(state->session,
                                                           state->io_setup);
@@ -441,7 +444,7 @@ struct composite_context *smb_composite_connect_send(struct smb_composite_connec
        c = talloc_zero(mem_ctx, struct composite_context);
        if (c == NULL) goto failed;
 
-       state = talloc(c, struct connect_state);
+       state = talloc_zero(c, struct connect_state);
        if (state == NULL) goto failed;
 
        if (event_ctx == NULL) {