segmentation fault
int make_post(const User *author, User *target, char *contents) {
    if ((author == NULL) || (target == NULL)){
        // if either User pointer is NULL
        return 2;
    }

    if (already_friends(author, target) == 1){
        // if users exist but are not friends
        return 1;
    }

    // Create Post
    Post *new_post = (Post*) malloc(sizeof(Post));
    if (strcpy(new_post->author, author->name) == NULL) {
        free(new_post);
    }
    if (strcpy(new_post->contents, contents) == NULL) {
        free(new_post);
    }

    time_t curtime;
    time(&curtime);
    new_post->date = &curtime;

    // Insert the new post at the front of the user's list of posts.
    if (target->first_post == NULL) {
        // If target does not have any post
        target->first_post = new_post;
        return 0;
    }

    Post *tail = target->first_post;
    while (tail->next != NULL) {
        tail = tail->next;
    }
    tail->next = new_post;
    return 0;
}