on which line do i deallocate memory
int make_post(const User *author, User *target, char *contents) {
    // Check if users exist
    if (author == NULL || target == NULL) {
        return 2;
    }

    // Create a variable to track if users are friends
    int friend_mutuality = 0;

    // Iterate through the friendlist of author to check if author
    // is friends with target
    for(int i = 0; i < MAX_FRIENDS; i++) {
        if (author->friends[i] == target) {
            // Update the tracker variable
            friend_mutuality++;
        }
    }

    // Return 1 if author is not friends with target
    if (friend_mutuality == 0) {
        return 1;
    }

    // Make a new post
    Post *new_post = malloc(sizeof(Post));
    if (new_post == NULL) {
        perror("Failed malloc");
        exit(-1);
    }
    // Set the author
    strcpy(new_post->author, author->name);
    // Set the contents
    new_post->contents = contents;
    // Set the date
    time_t *curr_time = malloc(sizeof(time_t));
    if (curr_time == NULL) {
        perror("Failed malloc");
        exit(-1);
    }
    time(curr_time) ;
    new_post->date = curr_time;
    
    // If target has no posts, set the next post to NULL,
    // Otherwise, set the next post to the second most recent post
    if (target->first_post == NULL) {
        new_post->next = NULL;
    } else {
        new_post->next = target->first_post;
    }

    // Set the target's first post equal to newest post
    target->first_post = new_post;
    return 0;
}