[cairo-commit] src/cairo-image-surface.c
Chris Wilson
ickle at kemper.freedesktop.org
Thu Jun 20 06:05:14 PDT 2013
src/cairo-image-surface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit e079e4e2297810ceb10798cf310a7fafe39b18f0
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Jun 20 14:02:14 2013 +0100
image: Mark the data as owned after stealing the snapshot's image
Victor Goya found that we ended up leaking memory after reading a PNG
into an image surface and drawing that onto a PDF surface. In
particular, he discovered that
commit 0bfd2acd35547fc2bd0de99cc67d153f0170697d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Aug 13 01:34:12 2012 +0100
xlib: Implement SHM fallbacks and fast upload paths
introduced a path to steal the image data for a snapshot (and thereby
avoid a redundant copy), but that path then lead to the leak of the
"owned" data.
Reported-by: Victor Goya <victor.goya at af83.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 49f6e18..98d928f 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -767,7 +767,7 @@ _cairo_image_surface_snapshot (void *abstract_surface)
clone->transparency = image->transparency;
clone->color = image->color;
- clone->owns_data = FALSE;
+ clone->owns_data = TRUE;
return &clone->base;
}
More information about the cairo-commit
mailing list