Why segmentation fault ?

int create_user(const char *name, User **user_ptr_add) {
    User *curr_user_ptr = *user_ptr_add;
    while(curr_user_ptr->next != NULL) {
        if(curr_user_ptr->name == name) {
            return 1;
        }
        curr_user_ptr = curr_user_ptr->next;
    }
    if(strlen(name) > 31) {
        return 2;
    }
    User *new_user_ptr = malloc(sizeof(User *));
    new_user_ptr =  curr_user_ptr->next;
    strncpy(new_user_ptr->name,name, 32);\
    return 0;
}