[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3453-g566f4e9
Volker Lendecke
vlendec at samba.org
Fri Feb 13 11:14:44 GMT 2009
The branch, v3-2-test has been updated
via 566f4e92390312feddedf16f2175139ef62ac45e (commit)
from 9aeca67cbeb1a04082b02d54150d042a7b5a241d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 566f4e92390312feddedf16f2175139ef62ac45e
Author: Volker Lendecke <vl at samba.org>
Date: Fri Feb 13 11:18:31 2009 +0100
Fix Coverity ID 745 (RESOURCE_LEAK)
-----------------------------------------------------------------------
Summary of changes:
source/utils/ntlm_auth.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/utils/ntlm_auth.c b/source/utils/ntlm_auth.c
index 8dd433c..2c62bd5 100644
--- a/source/utils/ntlm_auth.c
+++ b/source/utils/ntlm_auth.c
@@ -523,10 +523,10 @@ static NTSTATUS winbind_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB
{
static const char zeros[16] = { 0, };
NTSTATUS nt_status;
- char *error_string;
+ char *error_string = NULL;
uint8 lm_key[8];
uint8 user_sess_key[16];
- char *unix_name;
+ char *unix_name = NULL;
nt_status = contact_winbind_auth_crap(ntlmssp_state->user, ntlmssp_state->domain,
ntlmssp_state->workstation,
@@ -548,7 +548,6 @@ static NTSTATUS winbind_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB
*user_session_key = data_blob(user_sess_key, 16);
}
ntlmssp_state->auth_context = talloc_strdup(ntlmssp_state->mem_ctx, unix_name);
- SAFE_FREE(unix_name);
} else {
DEBUG(NT_STATUS_EQUAL(nt_status, NT_STATUS_ACCESS_DENIED) ? 0 : 3,
("Login for user [%s]\\[%s]@[%s] failed due to [%s]\n",
@@ -557,6 +556,9 @@ static NTSTATUS winbind_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB
error_string ? error_string : "unknown error (NULL)"));
ntlmssp_state->auth_context = NULL;
}
+
+ SAFE_FREE(error_string);
+ SAFE_FREE(unix_name);
return nt_status;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list