mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 00:38:06 +02:00
user-font: Plug some memory leaks
We were leaking a cairo_t and a surface here, in some code paths.
This commit is contained in:
parent
fb3734fac0
commit
537445c4f0
1 changed files with 3 additions and 0 deletions
|
|
@ -187,10 +187,13 @@ _cairo_user_scaled_glyph_init (void *abstract_font,
|
|||
status = cairo_status (cr);
|
||||
scaled_glyph->recording_is_color = TRUE;
|
||||
}
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
if (status == (cairo_int_status_t)CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED &&
|
||||
face->scaled_font_methods.render_glyph) {
|
||||
if (recording_surface)
|
||||
cairo_surface_destroy (recording_surface);
|
||||
recording_surface = _cairo_user_scaled_font_create_recording_surface (scaled_font, FALSE);
|
||||
|
||||
cr = _cairo_user_scaled_font_create_recording_context (scaled_font, recording_surface, FALSE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue