1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

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
This commit is contained in:
Jeremy Allison 2011-09-12 11:23:17 -07:00
parent 85332eb1c7
commit fad5e3be5e

View File

@ -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. */