summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-02 22:34:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:49:37 -0500
commitc6bbeded1572e8e1c2be470a92f0cdd912157108 (patch)
treee4336a0c09395a0fc090ebbbc8cfed3ff83da3aa
parent8cd5930a4b021cbee10edbefd3629dae028de052 (diff)
downloadsamba-c6bbeded1572e8e1c2be470a92f0cdd912157108.tar.gz
samba-c6bbeded1572e8e1c2be470a92f0cdd912157108.tar.bz2
samba-c6bbeded1572e8e1c2be470a92f0cdd912157108.zip
r12683: Fix declaration and initialisation placement.
Andrew Bartlett (This used to be commit 17e20930ec05f6385a8fccfc77fb0aca89ecef52)
-rw-r--r--source4/kdc/kpasswdd.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/kdc/kpasswdd.c b/source4/kdc/kpasswdd.c
index ee6317792b..7ae9a9f961 100644
--- a/source4/kdc/kpasswdd.c
+++ b/source4/kdc/kpasswdd.c
@@ -207,10 +207,6 @@ static BOOL kpasswd_process_request(struct kdc_server *kdc,
DATA_BLOB *reply)
{
struct auth_session_info *session_info;
- if (!msg) {
- return False;
- }
-
if (!NT_STATUS_IS_OK(gensec_session_info(gensec_security,
&session_info))) {
return kpasswdd_make_error_reply(kdc, mem_ctx,
@@ -236,7 +232,7 @@ static BOOL kpasswd_process_request(struct kdc_server *kdc,
enum samr_RejectReason reject_reason;
struct samr_DomInfo1 *dominfo;
struct ldb_context *samdb;
- struct ldb_message *msg = ldb_msg_new(mem_ctx);
+ struct ldb_message *msg;
krb5_context context = kdc->smb_krb5_context->krb5_context;
ChangePasswdDataMS chpw;
@@ -249,6 +245,11 @@ static BOOL kpasswd_process_request(struct kdc_server *kdc,
size_t len;
int ret;
+ msg = ldb_msg_new(mem_ctx);
+ if (!msg) {
+ return False;
+ }
+
ret = decode_ChangePasswdDataMS(input->data, input->length,
&chpw, &len);
if (ret) {