summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2024-05-14 23:19:24 +0900
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2024-05-21 10:43:15 +0000
commit1eed1e584ccd88c218ab8962cddf7b9daabb43b1 (patch)
treea4fd3dcb3e1fcfa8f4e02bbc5f875dccd9bca7f6
parentf4d5f057994eb366723cf303001a9ae8d11d4f8e (diff)
pango: Fix leaks on Windows
Apply upstream MR https://gitlab.gnome.org/GNOME/pango/-/merge_requests/740 Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1469>
-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
+