_cairo_unscaled_font_destroy (gstate->font);
cairo_font_destroy (gstate->font); gstate->font = NULL;  if (gstate->font_family) { free (gstate->font_family); gstate->font_family = NULL; }
_cairo_gstate_init_copy (cairo_gstate_t *gstate, cairo_gstate_t *other){    cairo_status_t status;    cairo_gstate_t *next;        /* Copy all members, but don't smash the next pointer */    next = gstate->next;    *gstate = *other;    gstate->next = next;    /* Now fix up pointer data that needs to be cloned/referenced */    if (other->dash) {	gstate->dash = malloc (other->num_dashes * sizeof (double));	if (gstate->dash == NULL)	    return CAIRO_STATUS_NO_MEMORY;	memcpy (gstate->dash, other->dash, other->num_dashes * sizeof (double));    }    if (other->font) {	gstate->font = other->font;	_cairo_unscaled_font_reference (gstate->font);    }    if (other->clip.region)    {		gstate->clip.region = pixman_region_create ();	pixman_region_copy (gstate->clip.region, other->clip.region);    }    cairo_surface_reference (gstate->surface);    cairo_surface_reference (gstate->clip.surface);    cairo_pattern_reference (gstate->pattern);        status = _cairo_path_init_copy (&gstate->path, &other->path);    if (status)	goto CLEANUP_FONT;    status = _cairo_pen_init_copy (&gstate->pen_regular, &other->pen_regular);    if (status)	goto CLEANUP_PATH;    return status;  CLEANUP_PATH:    _cairo_path_fini (&gstate->path);  CLEANUP_FONT:    _cairo_unscaled_font_destroy (gstate->font);    free (gstate->dash);    gstate->dash = NULL;    return status;}