Move the talloc_move call until *after* the check on status. Don't want to move somet...
authorJeremy Allison <jra@samba.org>
Mon, 12 Sep 2011 18:23:17 +0000 (11:23 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 12 Sep 2011 20:21:24 +0000 (22:21 +0200)
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

source3/auth/user_krb5.c

index 489080e0e8d4405f6993ed04955ee8da1e98d29b..b106e4597392a074371bb89d64faadbcdedc66d1 100644 (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. */