mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 07:58:02 +02:00
quartz-font: Do not leak CFDataRef's
CFData is allocated and thus needs to be freed.
This commit is contained in:
parent
947d35c195
commit
852e789b75
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue