summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes/pango.recipe2
-rw-r--r--recipes/pango/0001-pangowin32-Fix-PangoCoverage-and-hb_set_t-leaks.patch28
2 files changed, 30 insertions, 0 deletions
diff --git a/recipes/pango.recipe b/recipes/pango.recipe
index ba3e6f80..111ecc00 100644
--- a/recipes/pango.recipe
+++ b/recipes/pango.recipe
@@ -19,6 +19,8 @@ class Recipe(recipe.Recipe):
# https://gitlab.gnome.org/GNOME/pango/-/merge_requests/694
'pango/0001-win32-Fix-32bit-build-crash-on-DeleteDC.patch',
'pango/0004-utils-Check-that-help2man-can-run-if-found.patch',
+ # https://gitlab.gnome.org/GNOME/pango/-/merge_requests/740
+ 'pango/0001-pangowin32-Fix-PangoCoverage-and-hb_set_t-leaks.patch',
]
files_libs = ['libpangocairo-1.0', 'libpango-1.0', 'libpangoft2-1.0']
diff --git a/recipes/pango/0001-pangowin32-Fix-PangoCoverage-and-hb_set_t-leaks.patch b/recipes/pango/0001-pangowin32-Fix-PangoCoverage-and-hb_set_t-leaks.patch
new file mode 100644
index 00000000..d632de80
--- /dev/null
+++ b/recipes/pango/0001-pangowin32-Fix-PangoCoverage-and-hb_set_t-leaks.patch
@@ -0,0 +1,28 @@
+From e70b5ff0db2b5975dcb2b1c7024a2d55027f824b Mon Sep 17 00:00:00 2001
+From: Seungha Yang <seungha@centricular.com>
+Date: Tue, 14 May 2024 23:04:59 +0900
+Subject: [PATCH] pangowin32: Fix PangoCoverage and hb_set_t leaks
+
+Don't need to increase refcount of just created PangoCoverage created,
+and release hb_set_t after use.
+---
+ pango/pangowin32.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/pango/pangowin32.c b/pango/pangowin32.c
+index 6781e179..67b8675c 100644
+--- a/pango/pangowin32.c
++++ b/pango/pangowin32.c
+@@ -928,7 +928,8 @@ pango_win32_font_get_coverage (PangoFont *font,
+ while (hb_set_next(chars, &ch))
+ pango_coverage_set (coverage, ch, PANGO_COVERAGE_EXACT);
+
+- win32face->coverage = g_object_ref (coverage);
++ hb_set_destroy (chars);
++ win32face->coverage = coverage;
+ }
+
+ return g_object_ref (win32face->coverage);
+--
+2.42.0.windows.2
+