[cairo-commit] src/cairo-quartz-font.c
Andrea Canciani
ranma42 at kemper.freedesktop.org
Mon Nov 1 08:03:27 PDT 2010
src/cairo-quartz-font.c | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 852e789b756f9589b102a4b24b85642f199d0915
Author: Andrea Canciani <ranma42 at gmail.com>
Date: Mon Nov 1 15:53:10 2010 +0100
quartz-font: Do not leak CFDataRef's
CFData is allocated and thus needs to be freed.
diff --git a/src/cairo-quartz-font.c b/src/cairo-quartz-font.c
index d13b395..da9d2ae 100644
--- a/src/cairo-quartz-font.c
+++ b/src/cairo-quartz-font.c
@@ -778,6 +778,7 @@ _cairo_quartz_load_truetype_table (void *abstract_font,
if (length) {
if (*length == 0) {
*length = CFDataGetLength (data);
+ CFRelease (data);
return CAIRO_STATUS_SUCCESS;
}
@@ -788,6 +789,8 @@ _cairo_quartz_load_truetype_table (void *abstract_font,
if (buffer)
CFDataGetBytes (data, CFRangeMake (offset, len), buffer);
+ CFRelease (data);
+
return CAIRO_STATUS_SUCCESS;
}
More information about the cairo-commit
mailing list