script: Free the surface/font bitmaps.

This commit is contained in:
Chris Wilson 2010-03-23 20:08:04 +00:00
parent 83d1bd9f37
commit 548092fe8c

View file

@ -238,6 +238,16 @@ _bitmap_next_id (struct _bitmap *b,
return CAIRO_STATUS_SUCCESS;
}
static void
_bitmap_fini (struct _bitmap *b)
{
while (b != NULL) {
struct _bitmap *next = b->next;
free (b);
b = next;
}
}
static const char *
_direction_to_string (cairo_bool_t backward)
{
@ -1787,6 +1797,9 @@ _device_destroy (void *abstract_device)
assert (status == CAIRO_STATUS_SUCCESS);
}
_bitmap_fini (ctx->surface_id.next);
_bitmap_fini (ctx->font_id.next);
status = _cairo_output_stream_destroy (ctx->stream);
free (ctx);