segmentation fault, how do I make this run when user_ptpr_add is NULL
int create_user(const char *name, User **user_ptr_add) {
    if (strlen(name) >= MAX_NAME){
        // if name is too long
        return 2;
    }

    User *current = *user_ptr_add;
    while (current != NULL) {
        if (strcmp(current->name, name) == 0) {
            // If a user by this name already exists in this list
            return 1;
        }
        current = current->next;
        // current should traverse to the end of the linkedlist
    }

    // Create user
    User *new_user = (User*) malloc(sizeof(User));
    if (new_user == NULL) {
        return -1; // failed to allocate memory
    }
    strcpy(new_user->name, name);
    new_user->profile_pic[0] = '\0';
    new_user->first_post = NULL;
    memset(new_user->friends, 0, sizeof(new_user->friends));
    new_user->next = NULL;

    // Add to user_ptr_add == current
    if (user_ptr_add == NULL){
        *user_ptr_add = new_user;
    } else {
        User *tail = *user_ptr_add;
        while (tail->next != NULL) {
            tail = tail->next;
        }
        tail->next = new_user;
    }
    return 0;
}