Possible memory leak in callers of cairo_surface_get_font_options() not cleaning up the font options
This is related to !514 (merged). I grepped for cairo_surface_get_font_options
to find similar cases and found the following. I didn't do any testing at all on this and I am not sure whether I got this right or not.
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c
index ac24745e3..c4c0bdfbb 100644
--- a/src/cairo-paginated-surface.c
+++ b/src/cairo-paginated-surface.c
@@ -240,6 +240,7 @@ _cairo_paginated_surface_create_image_surface (void *abstract_surface,
cairo_surface_get_font_options (&surface->base, &options);
_cairo_surface_set_font_options (image, &options);
+ _cairo_font_options_fini (&options);
return image;
}
diff --git a/src/cairo-surface-wrapper.c b/src/cairo-surface-wrapper.c
index 29c19c5a5..c3a62f3af 100644
--- a/src/cairo-surface-wrapper.c
+++ b/src/cairo-surface-wrapper.c
@@ -507,6 +507,7 @@ _cairo_surface_wrapper_show_text_glyphs (cairo_surface_wrapper_t *wrapper,
dev_scaled_font,
dev_clip);
FINISH:
+ _cairo_font_options_fini (&options);
_cairo_clip_destroy (dev_clip);
if (dev_glyphs != stack_glyphs)
free (dev_glyphs);