diff options
author | todd stecher <todd.stecher@gmail.com> | 2009-02-09 13:25:59 -0800 |
---|---|---|
committer | Steven Danneman <steven.danneman@isilon.com> | 2009-02-10 14:43:14 -0800 |
commit | 9d4d2f70cbf83919a11c194c8234de269c5d91ee (patch) | |
tree | a8379f0ebb9a6d23f78109e1beb57541b279cbd2 /source3/utils/ntlm_auth.c | |
parent | fdd282afa3e80712790c5bbac84bf4f88644692a (diff) | |
download | samba-9d4d2f70cbf83919a11c194c8234de269c5d91ee.tar.gz samba-9d4d2f70cbf83919a11c194c8234de269c5d91ee.tar.bz2 samba-9d4d2f70cbf83919a11c194c8234de269c5d91ee.zip |
S3: Fixes for coverity issues.
Diffstat (limited to 'source3/utils/ntlm_auth.c')
-rw-r--r-- | source3/utils/ntlm_auth.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 8aa8e5e0f9..b94efc99cf 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -526,7 +526,7 @@ static NTSTATUS winbind_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB char *error_string; 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, @@ -549,7 +549,6 @@ static NTSTATUS winbind_pw_check(struct ntlmssp_state *ntlmssp_state, DATA_BLOB } ntlmssp_state->auth_context = talloc_strdup(ntlmssp_state, 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", @@ -558,6 +557,8 @@ 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(unix_name); return nt_status; } |