Do i need to use malloc for new_user->friends and new_user->next which are attributes for new_user?

int create_user(const char *name, User **user_ptr_add) {
    User *new_user;
    new_user = malloc(sizeof(User));
    User *current = *user_ptr_add;

    // 2 if the name cannot fit in the name array (e.g. > MAX_NAME)
    if (sizeof(name) > 31){
        return 2;
    }
    
    // When this loop stops, current is the last pointer to User in user_ptr_add
    while(current != NULL){
            // return 1 user already exists in this list
        if(strcmp(current->name, name) == 0){
            return 1;
        }
        current = current->next;
    }

    // copy the name to new_user.name
    strncpy(new_user->name, name, 32);
    new_user->name[strlen(new_user->name)] = '\0';

    // initialize this user's profile_pic to a null terminator 
    // (the first char in profile_pic)
    new_user->profile_pic[0] = '\0';

    // initialize other attributes
    new_user->first_post = NULL;
    for (int i = 0; i < MAX_FRIENDS; i++) {
        new_user->friends[i] = malloc(sizeof(User)); //Allocate space of 1 User
        new_user->friends[i] = NULL;
    }
    new_user->next = malloc(sizeof(User)); //Allocate space of 1 User
    new_user->next = NULL;

    // Add this new_user to the tail of user_prtr_add
    current->next = new_user;

    // return 0 if successful
    return 0;

    // Still need to free memory afterwards (!!!) 
    // Maybe everthing is freed through delete user
}