[cairo-commit] 2 commits - src/cairo-gstate.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Sep 20 14:28:49 UTC 2023

 src/cairo-gstate.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit ed86d953a6c037eb9d731953f4fb5c1f47ac7130
Merge: c45e373fb e36494695
Author: Uli Schlachter <psychon at znc.in>
Date:   Wed Sep 20 14:28:47 2023 +0000

    Merge branch 'leak' into 'master'
    Fix font options leak in _cairo_gstate_ensure_scaled_font()
    See merge request cairo/cairo!514

commit e364946957633343f7fd6ce32d4f64b33d631f5f
Author: Christian Hesse <mail at eworm.de>
Date:   Mon Sep 18 23:23:23 2023 +0200

    Fix font options leak in _cairo_gstate_ensure_scaled_font()
    Font options are allocated in _cairo_gstate_ensure_scaled_font() for local
    processing, but never freed. Run _cairo_font_options_fini() on these and
    fix the leak.
    Signed-off-by: Christian Hesse <mail at eworm.de>

diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index e9019e8e6..323f80488 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -1920,6 +1920,8 @@ _cairo_gstate_ensure_scaled_font (cairo_gstate_t *gstate)
+    _cairo_font_options_fini (&options);
     status = cairo_scaled_font_status (scaled_font);
     if (unlikely (status))
 	return status;

More information about the cairo-commit mailing list