summaryrefslogtreecommitdiff
path: root/source4/libcli/auth/ntlmssp.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/auth/ntlmssp.c')
-rw-r--r--source4/libcli/auth/ntlmssp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/libcli/auth/ntlmssp.c b/source4/libcli/auth/ntlmssp.c
index 5d61361d69..bee93985ac 100644
--- a/source4/libcli/auth/ntlmssp.c
+++ b/source4/libcli/auth/ntlmssp.c
@@ -146,6 +146,9 @@ static NTSTATUS set_challenge(struct ntlmssp_state *ntlmssp_state, DATA_BLOB *ch
NTSTATUS ntlmssp_set_username(struct ntlmssp_state *ntlmssp_state, const char *user)
{
ntlmssp_state->user = talloc_strdup(ntlmssp_state, user);
+ if (!user) {
+ ntlmssp_state->user = NULL;
+ }
if (!ntlmssp_state->user) {
return NT_STATUS_NO_MEMORY;
}