From 42745adabeca7a1ad4121fa95bd9678d6f6b83d1 Mon Sep 17 00:00:00 2001 From: liuyumeng Date: Thu, 19 Aug 2021 16:10:07 +0800 Subject: [PATCH] fix a memory leak --- backport-fix-a-memory-leak.patch | 27 ++++++++++ glib2.spec | 86 ++++++++------------------------ 2 files changed, 47 insertions(+), 66 deletions(-) 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 e2ecfb1..66440b3 100644 --- a/glib2.spec +++ b/glib2.spec @@ -1,37 +1,18 @@ 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 -Patch9001: fix-accidentally-delete-temp-file-within-dtrace.patch - -Patch6001: backport-gsocketclient-set-IP-BIND-ADDRESS-NO-PORT-if-binding.patch -Patch6002: backport-gsocketclient-emit-RESOLVING-RESOLVED-events-only-once.patch -Patch6003: backport-gsocketclient-Crash-on-error-if-error-is-missing.patch -Patch6004: backport-gsocketclient-return-best-errors-possible.patch -Patch6005: backport-gsocketclient-fix-crash-when-async-connectio-step-fails.patch -Patch6006: backport-Correct-memory-leaks-of-error-in-completion-case.patch -Patch6007: backport-gapplication-Fix-a-memory-leak.patch -Patch6008: backport-gdbusauth-fix-error-leak.patch -Patch6009: backport-gdbusobjectmanagerservice-fix-leak-in-error-path.patch -Patch6010: backport-gfileenumerator-fix-leak-in-error-path.patch -Patch6011: backport-gsettings-Fix-a-minor-memory-leak-when-getting-GSettingsAction-state.patch - -BuildRequires: chrpath gcc gcc-c++ gettext perl-interpreter -%ifnarch i686 -BUildRequires: gtk-doc -%endif +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) BuildRequires: pkgconfig(libpcre) pkgconfig(mount) pkgconfig(zlib) BuildRequires: python3-devel gamin-devel -Requires: %{name}-help -%ifarch i686 -BuildRequires: libxslt -%endif Provides: %{name}-fam = %{version}-%{release} Obsoletes: %{name}-fam < %{version}-%{release} @@ -58,7 +39,6 @@ Obsoletes: %{name}-tests < %{version}-%{release} %description devel Development and test files for the GLib library. -%ifnarch i686 %package help Summary: help document for the glib2 package Buildarch: noarch @@ -67,20 +47,14 @@ Obsoletes: %{name}-doc < %{version}-%{release} %description help help document for the glib2 package. -%endif %prep %autosetup -n glib-%{version} -p1 %build rm glib/pcre/*.[ch] -%meson --default-library=both -Ddtrace=true \ -%ifarch i686 - -Dman=false -Dgtk_doc=false \ -%else - -Dman=true -Dgtk_doc=true \ -%endif - -Dsystemtap=true -Dfam=true -Dinstalled_tests=true +%meson --default-library=both -Dman=true -Ddtrace=true \ + -Dsystemtap=true -Dgtk_doc=true -Dfam=true -Dinstalled_tests=true %meson_build @@ -98,16 +72,6 @@ mv %{buildroot}%{_bindir}/gio-querymodules %{buildroot}%{_bindir}/gio-querymodu touch %{buildroot}%{_libdir}/gio/modules/giomodule.cache %find_lang glib20 -#remove rpath -chrpath -d %{buildroot}%{_libexecdir}/installed-tests/glib/gdbus-peer - -mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d -echo %{_libexecdir}/installed-tests/glib > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf - -%ldconfig_scriptlets devel - - - %transfiletriggerin -- %{_libdir}/gio/modules gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules &> /dev/null || : @@ -144,8 +108,6 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_bindir}/gapplication %files devel -%defattr(-,root,root) -%config(noreplace) /etc/ld.so.conf.d/* %{_libdir}/lib*.so %{_libdir}/glib-2.0 %{_libdir}/pkgconfig/* @@ -173,58 +135,50 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_bindir}/glib-compile-resources %{_bindir}/gresource %attr (0755, root, root) %{_bindir}/gtester-report -%ifarch i686 -%exclude %{_libexecdir}/installed-tests/glib/libgdbus-example-objectmanager.a -%exclude %{_datadir}/glib-2.0/codegen/__pycache__ -%exclude %{_datadir}/glib-2.0/gdb/__pycache__ -%exclude %{_datadir}/installed-tests/glib/static-link.test -%endif - -%ifnarch i686 + %files help %defattr(-,root,root) %{_mandir}/man1/* %doc %{_datadir}/gtk-doc/html/* -%endif %changelog -* Sat Jun 5 2021 wangkerong - 2.66.8-1 -- Type:NA +* Sat Aug 14 2021 liuyumeng - 2.66.8-2 +- Type:bugfix - Id:NA - SUG:NA -- DESC:Upgrade to 2.66.8 +- DESC:fix a memory leak -* Fri May 21 2021 hanhui - 2.62.5-7 -- add i686 options,round community patches +* Mon Jul 5 2021 weijin deng - 2.66.8-1 +- Upgrade to 2.66.8 +- Update Version, Release +- Delete patch files, delete gio-launch-desktop(not exist in 2.66.8) +- Correct date, make it match weekday -* Tue Apr 13 2021 hanhui - 2.62.5-6 +* Tue Apr 13 2021 hanhui - 2.62.5-5 - Type:cve - Id:CVE-2021-28153 - SUG:NA - DESC:fix CVE-2021-28153 -* Sat Mar 6 2021 hanhui - 2.62.5-5 +* Sat Mar 6 2021 hanhui - 2.62.5-4 - Type:cve - Id:CVE-2021-27219 - SUG:NA - DESC:fix CVE-2021-27219 -* Mon Mar 1 2021 jinzhimin - 2.62.5-4 +* Mon Mar 1 2021 jinzhimin - 2.62.5-3 - Type:cve - Id:CVE-2021-27218 - SUG:NA - DESC:fix CVE-2021-27218 -* Sat Feb 27 2021 zhujunhao - 2.62.5-3 +* Sat Feb 27 2021 zhujunhao - 2.62.5-2 - Type:cve - Id:CVE-2020-35457 - SUG:NA - DESC:fix CVE-2020-35457 -* Thu Nov 5 2020 wangye - 2.62.5-2 -- add require for package - -* Thu Apr 16 2020 hexiujun - 2.62.5-1 +* Tue Jul 21 2020 hanhui - 2.62.5-1 - Update to 2.62.5 * Mon Mar 2 2020 hexiujun - 2.62.1-4 -- Gitee