Author: metze
Date: 2006-10-24 16:14:00 +0000 (Tue, 24 Oct 2006)
New Revision: 19480

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19480

Log:
- clear the whole session struct (only let the pid untouched)
- zero state struct

metze
Modified:
   branches/SAMBA_4_0/source/libcli/smb_composite/connect.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/smb_composite/connect.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/smb_composite/connect.c    2006-10-24 
08:08:03 UTC (rev 19479)
+++ branches/SAMBA_4_0/source/libcli/smb_composite/connect.c    2006-10-24 
16:14:00 UTC (rev 19480)
@@ -179,6 +179,9 @@
                 * 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 @@
        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) {

Reply via email to