auth: Fix CID 1458420 Null pointer dereferences (REVERSE_INULL)
[amitay/samba.git] / source3 / auth / auth_sam.c
index c6357c696eaca1cc70661e05c6f64695ce335437..738c2a2a788b3d0a4cafeb6791ab2355a7e8e7d8 100644 (file)
@@ -80,12 +80,13 @@ static NTSTATUS auth_samstrict_auth(const struct auth_context *auth_context,
                                    const struct auth_usersupplied_info *user_info,
                                    struct auth_serversupplied_info **server_info)
 {
-       const char *effective_domain = user_info->mapped.domain_name;
+       const char *effective_domain = NULL;
        bool is_local_name, is_my_domain;
 
        if (!user_info || !auth_context) {
                return NT_STATUS_LOGON_FAILURE;
        }
+       effective_domain = user_info->mapped.domain_name;
 
        if (user_info->mapped.account_name == NULL ||
            user_info->mapped.account_name[0] == '\0')