diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-05-08 14:01:00 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2007-05-08 16:47:40 +0100 |
commit | b85920684f8feaba8d2d5b0262c60b4960c223b8 (patch) | |
tree | f4ca1b2301f16756f1d686a3cbf9e21ea1631c35 /test/cairo-test.c | |
parent | 0bf3ffacda5dbfc4fd8a5a0d5fd37d9630f5bcdb (diff) |
[cairo-test] Destroy the check image on failure
If drawing the checker pattern should fail, we need to free the
resources allocated locally.
Diffstat (limited to 'test/cairo-test.c')
-rwxr-xr-x | test/cairo-test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/cairo-test.c b/test/cairo-test.c index 7bc5dd65..3a920502 100755 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -680,8 +680,10 @@ cairo_test_paint_checkered (cairo_t *cr) check = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 12, 12); status = _draw_check (check, 12, 12); - if (status) + if (status) { + cairo_surface_destroy (check); return status; + } cairo_save (cr); cairo_set_source_surface (cr, check, 0, 0); |