summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-09-12 11:23:17 -0700
committerJeremy Allison <jra@samba.org>2011-09-12 22:21:24 +0200
commitfad5e3be5e4739e9e19f3f87a49c059336a436d4 (patch)
tree64f5304d37b80645fc2b2b2e322782336f732232 /source3
parent85332eb1c721d585e1a33101bddafdca4073e10f (diff)
downloadsamba-fad5e3be5e4739e9e19f3f87a49c059336a436d4.tar.gz
samba-fad5e3be5e4739e9e19f3f87a49c059336a436d4.tar.bz2
samba-fad5e3be5e4739e9e19f3f87a49c059336a436d4.zip
Move the talloc_move call until *after* the check on status. Don't want to move something that might be invalid.
Makes the code match what is currently in 3.6.x. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Sep 12 22:21:24 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/user_krb5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/auth/user_krb5.c b/source3/auth/user_krb5.c
index 489080e0e8..b106e45973 100644
--- a/source3/auth/user_krb5.c
+++ b/source3/auth/user_krb5.c
@@ -243,9 +243,6 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
status = make_server_info_pw(&tmp, username, pw);
}
- /* Steal tmp server info into the server_info pointer. */
- server_info = talloc_move(mem_ctx, &tmp);
-
TALLOC_FREE(sampass);
if (!NT_STATUS_IS_OK(status)) {
@@ -254,6 +251,9 @@ NTSTATUS make_session_info_krb5(TALLOC_CTX *mem_ctx,
return status;
}
+ /* Steal tmp server info into the server_info pointer. */
+ server_info = talloc_move(mem_ctx, &tmp);
+
/* make_server_info_pw does not set the domain. Without this
* we end up with the local netbios name in substitutions for
* %D. */