do i have memory leak?
#define MAX_NAME 32     // Max username and profile_pic filename lengths
#define MAX_FRIENDS 10  // Max number of friends a user can have

typedef struct user {
    char name[MAX_NAME];
    char profile_pic[MAX_NAME];  // This is a *filename*, not the file contents.
    struct post *first_post;
    struct user *friends[MAX_FRIENDS];
    struct user *next;
} User;

typedef struct post {
    char author[MAX_NAME];
    char *contents;
    time_t *date;
    struct post *next;
} Post;

/*
 * Print a user profile.
 * For an example of the required output format, see the example output
 * linked from the handout.
 * Return:
 *   - 0 on success.
 *   - 1 if the user is NULL.
 */
int print_user(const User *user) {
    // check if user is NULL
    if (user == NULL) {
        return 1;
    }

    // check if there is a profile pic associated with the user
    if (strlen(user->profile_pic) != 0){
        //open the profile pic
        FILE *fptr;
        fptr = fopen(user->profile_pic, "r");
        if (fptr == NULL){
            printf("Cannot open file \n");
        }
  
        // Read contents from file and print them 
        else {
            char pic = fgetc(fptr);
            while (pic != EOF){
                printf ("%c", pic);
                pic = fgetc(fptr);
            }
        }
        fclose(fptr);
        printf("\n");
    }
    // print name
    printf("Name: %s\n", user->name);
    printf("------------------------------------------\n");

    // print each friend in order in which they became friends
    printf("Friends:\n");
    for (int i = 0; i < MAX_FRIENDS; i++) {
        User *friend = user->friends[i];
        if (friend != NULL) {
            printf("%s\n", friend->name);
        }
    }
    printf("------------------------------------------\n");

    printf("Posts:\n");
    Post *current_post = user->first_post;
    while (current_post != NULL) {
        printf("From: %s\n", current_post->author);
        // convert time_t to a string
        printf("Date: %s", ctime(current_post->date));
        // checks if post is the last to see if "===" is needed
        if (current_post->next == NULL){
            printf("\n%s\n", current_post->contents);
        }
        else {
            printf("\n%s\n\n===\n\n", current_post->contents);
        }
        current_post = current_post->next;
    }
    printf("------------------------------------------\n");
    free(current_post->contents);
    return 0;
}