[cairo-commit] src/test-paginated-surface.c

Carl Worth cworth at kemper.freedesktop.org
Tue Aug 8 02:24:57 PDT 2006


 src/test-paginated-surface.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletion(-)

New commits:
diff-tree 2d483e0785b18a8bb51f5b1c1a0267029f68a64a (from cb5edb6c35f7c80d1f91172b98f25ee33f21bce9)
Author: Carl Worth <cworth at cworth.org>
Date:   Tue Aug 8 02:24:48 2006 -0700

    test-paginated: Fix memory leak within _test_paginated_surface_create_for_data

diff --git a/src/test-paginated-surface.c b/src/test-paginated-surface.c
index 1bdab6b..4548df5 100644
--- a/src/test-paginated-surface.c
+++ b/src/test-paginated-surface.c
@@ -95,6 +95,16 @@ _test_paginated_surface_create_for_data 
 					    &test_paginated_surface_paginated_backend);
 }
 
+static cairo_status_t
+_test_paginated_surface_finish (void *abstract_surface)
+{
+    test_paginated_surface_t *surface = abstract_surface;
+
+    cairo_surface_destroy (surface->target);
+
+    return CAIRO_STATUS_SUCCESS;
+}
+
 static cairo_int_status_t
 _test_paginated_surface_set_clip_region (void *abstract_surface,
 					 pixman_region16_t *region)
@@ -247,7 +257,7 @@ static const cairo_surface_backend_t tes
      * surface backend interface as historical cruft and ignore it. */
 
     NULL, /* create_similar */
-    NULL, /* finish */
+    _test_paginated_surface_finish,
     NULL, /* acquire_source_image */
     NULL, /* release_source_image */
     NULL, /* acquire_dest_image */


More information about the cairo-commit mailing list