int create_user(const char *name, User **user_ptr_add) {
    // create temp user struct with given name
    User new_user;
    strcpy(new_user.name, name);
    strcpy(new_user.profile_pic, "");
    new_user.first_post = NULL;
    // initialize friends list to be all NULL
    for (int i = 0; i < MAX_FRIENDS; i++) {
        new_user.friends[i] = NULL;
    }
    new_user.next = NULL;

    if (strlen(name) > MAX_NAME) {  // +1 for null term?
        return 2;
    }

    // success case: list of pointers is empty
    if (user_ptr_add == NULL) {
        *user_ptr_add = &new_user;
        return 0;
    }

    // check whether name exists in list of pointers
    User *head = *user_ptr_add;
    while (head->next != NULL) {
        if (head->name == name) {
            return 1;
        }
        head = head->next;
    }

    // checks passed; allocate memory for the new user, add, and return
    // struct user *new_userr = malloc(sizeof(struct user));
    new_user = malloc(sizeof(struct user));
    head->next = &new_user;
    return 0;
}
how to use malloc to dynamically allocate space for new_user 