why am i getting a segmentation fault?
int create_user(const char *name, User **user_ptr_add) {
    User *curr = malloc(sizeof(User));
    curr = *user_ptr_add;
    while (curr->next != NULL) {
        if (curr->name == name) {
            return 1;
        }
        curr = curr->next;
    }

    if (strlen(name) + 1 > 32) {
        return 2;
    }

    User *new_user = malloc(sizeof(User));
    strncpy(new_user->name, name, 31);
    new_user->next = NULL;
    curr->next = new_user;

    return 0;
}