summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/cairo-test.c4
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);