why does this raise segmentation fault
int create_user(const char *name, User **user_ptr_add) {
    User *curr = user_ptr_add[0];
    while (curr->next != NULL) {
        if (strcmp(name, curr->name) == 0) {
            return 1;
        }
        curr = curr->next;
    }