From 5ebe65b5e85855e8aee9e61c8df5faf9739fa5b3 Mon Sep 17 00:00:00 2001 From: David King Date: Thu, 17 Feb 2022 11:31:42 +0000 Subject: [PATCH] Fix treeview a11y refcount leak (#2055013) Resolves: #2055013 --- gtk3-3.24.31-treeview-a11y-leak-fix.patch | 27 +++++++++++++++++++++++ gtk3.spec | 7 +++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gtk3-3.24.31-treeview-a11y-leak-fix.patch diff --git a/gtk3-3.24.31-treeview-a11y-leak-fix.patch b/gtk3-3.24.31-treeview-a11y-leak-fix.patch new file mode 100644 index 0000000..f2dc206 --- /dev/null +++ b/gtk3-3.24.31-treeview-a11y-leak-fix.patch @@ -0,0 +1,27 @@ +From cc977be580b9a7c2683810fe36fe485ee8583ec0 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Fri, 11 Feb 2022 18:39:55 -0500 +Subject: [PATCH] Fix a leak of cell accessibles + +gtk_container_cell_accessible_add_child is transfer none, +so we need to drop the reference we hold, otherwise it +leaks. +--- + gtk/a11y/gtktreeviewaccessible.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c +index c1a2097a1e..c2b7e8add0 100644 +--- a/gtk/a11y/gtktreeviewaccessible.c ++++ b/gtk/a11y/gtktreeviewaccessible.c +@@ -413,6 +413,7 @@ create_cell_accessible (GtkTreeView *treeview, + { + cell = create_cell_accessible_for_renderer (l->data, GTK_WIDGET (treeview), ATK_OBJECT (container)); + gtk_container_cell_accessible_add_child (container, cell); ++ g_object_unref (cell); + } + + cell = GTK_CELL_ACCESSIBLE (container); +-- +GitLab + diff --git a/gtk3.spec b/gtk3.spec index a2e06e1..f8fd520 100644 --- a/gtk3.spec +++ b/gtk3.spec @@ -19,7 +19,7 @@ Name: gtk3 Version: 3.24.31 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GTK+ graphical user interface library License: LGPLv2+ @@ -33,6 +33,8 @@ Patch0: gtk3-3.24.30-entry-no-emoji-context-menu.patch Patch1: gtk3-3.24.31-meson.patch # https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4280 Patch2: gtk3-3.24.31-meson-reftest.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=2055013 +Patch3: gtk3-3.24.31-treeview-a11y-leak-fix.patch BuildRequires: pkgconfig(atk) >= %{atk_version} BuildRequires: pkgconfig(atk-bridge-2.0) @@ -300,6 +302,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &>/dev/null || : %{_datadir}/installed-tests/ %changelog +* Thu Feb 17 2022 David King - 3.24.31-2 +- Fix treeview a11y refcount leak (#2055013) + * Thu Jan 13 2022 David King - 3.24.31-1 - Rebase to 3.24.31 (#2010192)