summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-12-01 16:13:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:16:17 -0500
commitc81c8cb4a7962f5437690a106bd7793b38175af2 (patch)
tree58d53e456fd488d4bf1c5c5064824aaa479bd8f6 /source3
parentd908a897ed166e4592892d4b6773abf8614d1c6f (diff)
downloadsamba-c81c8cb4a7962f5437690a106bd7793b38175af2.tar.gz
samba-c81c8cb4a7962f5437690a106bd7793b38175af2.tar.bz2
samba-c81c8cb4a7962f5437690a106bd7793b38175af2.zip
r19984: Must have been drunk yesterday.
Freeing memctx is all we need, fix double free stupidity (This used to be commit 2a7454959e93e5bd11161707d0bd16a431b92351)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/sesssetup.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 11c5e9bbf9..0cf6692e22 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -302,8 +302,7 @@ static int reply_spnego_kerberos(connection_struct *conn,
DEBUG(1, ("PAM account restriction prevents user login\n"));
data_blob_free(&ap_rep);
data_blob_free(&session_key);
- talloc_destroy(mem_ctx);
- TALLOC_FREE(pw);
+ TALLOC_FREE(mem_ctx);
return ERROR_NT(nt_status_squash(ret));
}
}
@@ -327,7 +326,7 @@ static int reply_spnego_kerberos(connection_struct *conn,
SAFE_FREE(client);
data_blob_free(&ap_rep);
data_blob_free(&session_key);
- talloc_destroy(mem_ctx);
+ TALLOC_FREE(mem_ctx);
return ERROR_NT(nt_status_squash(NT_STATUS_LOGON_FAILURE));
}
}
@@ -335,6 +334,8 @@ static int reply_spnego_kerberos(connection_struct *conn,
/* setup the string used by %U */
sub_set_smb_name( real_username );
+C_FR
+C_FREE
reload_services(True);
if ( map_domainuser_to_guest ) {
@@ -352,7 +353,6 @@ static int reply_spnego_kerberos(connection_struct *conn,
data_blob_free(&ap_rep);
data_blob_free(&session_key);
TALLOC_FREE(mem_ctx);
- TALLOC_FREE(pw);
return ERROR_NT(nt_status_squash(ret));
}
@@ -366,7 +366,6 @@ static int reply_spnego_kerberos(connection_struct *conn,
data_blob_free(&ap_rep);
data_blob_free(&session_key);
TALLOC_FREE(mem_ctx);
- TALLOC_FREE(pw);
return ERROR_NT(nt_status_squash(ret));
}
@@ -390,7 +389,6 @@ static int reply_spnego_kerberos(connection_struct *conn,
SAFE_FREE(client);
data_blob_free(&ap_rep);
data_blob_free(&session_key);
- TALLOC_FREE(pw);
TALLOC_FREE( mem_ctx );
TALLOC_FREE( server_info );
return ERROR_NT(nt_status_squash(ret));
@@ -435,7 +433,6 @@ static int reply_spnego_kerberos(connection_struct *conn,
data_blob_free(&ap_rep_wrapped);
data_blob_free(&response);
TALLOC_FREE(mem_ctx);
- TALLOC_FREE(pw);
return -1; /* already replied */
}