[PATCH] xlib/shm: Fix memory leak

Adam Jackson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Despite subclassing image surfaces, we never called down to the image
surface destructor, so we leaked a pixman_image_t every time.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=882976
Signed-off-by: Adam Jackson <[email protected]>
---
 src/cairo-xlib-surface-shm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index b03dd83..684d7e8 100644
--- a/src/cairo-xlib-surface-shm.c
+++ b/src/cairo-xlib-surface-shm.c
@@ -679,7 +679,7 @@ _cairo_xlib_shm_surface_finish (void *abstract_surface)
     cairo_list_del (&shm->link);
 
     cairo_device_release (&display->base);
-    return CAIRO_STATUS_SUCCESS;
+    return _cairo_image_surface_finish (abstract_surface);
 }
 
 static const cairo_surface_backend_t cairo_xlib_shm_surface_backend = {
-- 
1.8.0.1

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.