int make_friends (const char *name1, const char *name2, User *head) {
    /* Find the users from the user list first, regardless of whether 
    they are valid users or not*/
    User *user1 = find_user(name1, head);
    User *user2 = find_user(name2, head);
    // To count for existing friends a user has (To be later)
    int count = 1;

    // ====================== Checking assumptions ========================
    // If one of them is not even a user
    if (user1 == NULL || user2 == NULL) {
        return 4;
    } // Now both the users beyond this point are valid

    // If they are the same user
    if (strcmp(name1, name2) == 0) {
        return 3;
    }

    // Count for how many friends in each user's friendlist 
    if (*user1->friends) {
        printf("There is at least one friend for the first user\n"); 
        User *currfriend = *user1->friends; 
        while (currfriend->next) { 
            count++;
            currfriend = currfriend->next;
        }
        if (count == MAX_FRIENDS) {
            return 2;
        }
    }
    if (*user2->friends) {
        printf("There is at least one friend for the second user\n"); 
        // Reset
        count = 1;
        User *currfriend = *user2->friends; 
        while (currfriend->next) {
            printf("%10s\n", currfriend->name); 
            count++;
            currfriend = currfriend->next;
        }
        if (count == MAX_FRIENDS) {
            return 2;
        }
    }

    /* If both of them are already friends. 
    Note that friendship is symmetric, so checking one is good enough*/
    
    User *first_currfriend = *user1->friends; 
    User *second_currfriend = *user2->friends;
    // If the name is NULL <=> that user does NOT exist

    while (second_currfriend->name != NULL) {
        if (strcmp(second_currfriend->name, name1) == 0) {
            return 1;
        }
        second_currfriend = second_currfriend->next;
    }
    

    // ======================== Making friendships =============================
    // Loop till the end of each non-empty friendlists 
    User *copy1 = malloc(sizeof(User));
    User *copy2 = malloc(sizeof(User)); 

    User user_copy1 = *user1;
    User user_copy2 = *user2;
    copy1 = &user_copy1;
    copy2 = &user_copy2;

    copy1->next = NULL; 
    copy2->next = NULL; 

    if (first_currfriend) {
        while (first_currfriend->name) {
            if (strcmp(first_currfriend->name, name2) == 0) {
                return 1;
            }
            first_currfriend = first_currfriend->next;
        }
        // At the end of the friend list for first user
        first_currfriend->next = user2;
    }
    if (second_currfriend) {
        while (second_currfriend->name != NULL) {
            if (strcmp(second_currfriend->name, name1) == 0) {
                return 1;
            }
            second_currfriend = second_currfriend->next;
        }
        // At the end of the friend list for second user
        second_currfriend->next = user1; 
    }
    printf("\n"); 

    
    
    // Now is the case when the first or the second user does not have a friend yet
    if (!*(user1->friends)) {
        // Here the first user does not have any friend
        printf("There is not even a friend for user1\n");
        *(user1->friends) = user2; 
    }
    if (!*(user2->friends)) {
        // Here the second user does not have any friend 
        printf("There is not even a friend for user2\n");
        *(user2->friends) = user1; 
    }
    return 0;
}

Having copy1 and copy2 stored in the heap and lasted after the function call to make_friends()