From fd583e8b9722cd9779589accace086a611fe63a1 Mon Sep 17 00:00:00 2001 From: liuyumeng Date: Sat, 14 Aug 2021 10:23:17 +0800 Subject: [PATCH] fix a memory leak --- backport-fix-a-memory-leak.patch | 27 +++++++++++++++++++++++++++ glib2.spec | 10 +++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 backport-fix-a-memory-leak.patch diff --git a/backport-fix-a-memory-leak.patch b/backport-fix-a-memory-leak.patch new file mode 100644 index 0000000..e303568 --- /dev/null +++ b/backport-fix-a-memory-leak.patch @@ -0,0 +1,27 @@ +From df500c68a4d0741d1d6cf8ec3f8039a0d1f4b174 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ga=C3=ABl=20Bonithon?= +Date: Tue, 1 Jun 2021 17:43:45 +0200 +Subject: [PATCH] inotify: Fix a memory leak + +Fixes: #2311 +Conflict:NA +Reference:https://github.com/GNOME/glib/commit/df500c68a4d0741d1d6cf8ec3f8039a0d1f4b174 +--- + gio/inotify/inotify-path.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gio/inotify/inotify-path.c b/gio/inotify/inotify-path.c +index f0528f4..e1129cd 100644 +--- a/gio/inotify/inotify-path.c ++++ b/gio/inotify/inotify-path.c +@@ -208,6 +208,7 @@ ip_watched_file_free (ip_watched_file_t *file) + g_assert (file->subs == NULL); + g_free (file->filename); + g_free (file->path); ++ g_free (file); + } + + static void +-- +2.27.0 + diff --git a/glib2.spec b/glib2.spec index 49e3799..66440b3 100644 --- a/glib2.spec +++ b/glib2.spec @@ -1,11 +1,13 @@ Name: glib2 Version: 2.66.8 -Release: 1 +Release: 2 Summary: The core library that forms the basis for projects such as GTK+ and GNOME License: LGPLv2+ URL: http://www.gtk.org Source0: http://download.gnome.org/sources/glib/2.66/glib-%{version}.tar.xz +Patch6000: backport-fix-a-memory-leak.patch + BuildRequires: chrpath gcc gcc-c++ gettext gtk-doc perl-interpreter BUildRequires: glibc-devel libattr-devel libselinux-devel meson BuildRequires: systemtap-sdt-devel pkgconfig(libelf) pkgconfig(libffi) @@ -140,6 +142,12 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %doc %{_datadir}/gtk-doc/html/* %changelog +* Sat Aug 14 2021 liuyumeng - 2.66.8-2 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:fix a memory leak + * Mon Jul 5 2021 weijin deng - 2.66.8-1 - Upgrade to 2.66.8 - Update Version, Release -- Gitee