what line is causing a segmentation fault and how can i fix it
typedef struct user {
    char name[MAX_NAME];
    char profile_pic[MAX_NAME];  // This is a *filename*, not the file contents.
    struct post *first_post;
    struct user *friends[MAX_FRIENDS];
    struct user *next;
} User;

int create_user(const char *name, User **user_ptr_add) {
    if(strlen(name) > 33){
        return -2;
    }

    while((*user_ptr_add)->next != NULL && *user_ptr_add != NULL){
        if (strcmp((**user_ptr_add).name, name) == 0){
            return -1;
        }
        *user_ptr_add = (*user_ptr_add)->next;
    }

    User *add = malloc(sizeof(User));
    strcpy(add->name, name);

    if((*user_ptr_add) == NULL){
        user_ptr_add = &add;
    }
    else{
        (*user_ptr_add)->next = add;
    }
    return 0;
}