I'm getting a segmentation fault, and I think its from this function. Do you know why?
struct pixel **read_pixel_array(FILE *image, int pixel_array_offset, int width, int height) {
    struct pixel **to_return = malloc(sizeof(struct pixel **) * height);
    for (int i = 0; i < height; i++) {
        to_return[i] = malloc(sizeof(struct pixel *) * width);
    }
    fseek(image, pixel_array_offset, SEEK_SET);
    for (int i = 0; i < height; i++) {
        for (int j = 0; j < width; j++) {
            struct pixel my_pixel;
            fread(my_pixel.blue, sizeof(unsigned char), 1, image);
            fread(my_pixel.green, sizeof(unsigned char), 1, image);
            fread(my_pixel.red, sizeof(unsigned char), 1, image);
            to_return[i][j] = my_pixel;
        }
    }
    return to_return;
}