[cairo-commit] cairo/src cairo-quartz-surface.c,1.19,1.20
Carl Worth
commit at pdx.freedesktop.org
Thu Aug 18 14:34:13 PDT 2005
Committed by: cworth
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv31790/src
Modified Files:
cairo-quartz-surface.c
Log Message:
2005-08-18 Carl Worth <cworth at cworth.org>
* src/cairo-quartz-surface.c
(_cairo_quartz_surface_acquire_source_image): Fix to not leak
surface->cgImage on out-of-memory (thanks to Josh Aas
<joshmoz at gmail.com>).
Index: cairo-quartz-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-quartz-surface.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- cairo-quartz-surface.c 31 Jul 2005 18:03:35 -0000 1.19
+++ cairo-quartz-surface.c 18 Aug 2005 21:34:10 -0000 1.20
@@ -125,8 +125,8 @@
surface->width,
surface->height, rowBytes);
if (surface->image->base.status) {
- /* XXX: I assume we're leaking memory here, but I don't know
- * the right call to use to clean up from CGImageCreate. */
+ if (surface->cgImage)
+ CGImageRelease(surface->cgImage);
return CAIRO_STATUS_NO_MEMORY;
}
More information about the cairo-commit
mailing list