diff --git a/0001-Plug-a-memory-leak.patch b/0001-Plug-a-memory-leak.patch new file mode 100644 index 0000000..61f9174 --- /dev/null +++ b/0001-Plug-a-memory-leak.patch @@ -0,0 +1,36 @@ +From 20a3f99eba5001925b8b313da3accb7900eb1927 Mon Sep 17 00:00:00 2001 +From: Emilio Pozuelo Monfort +Date: Tue, 25 Oct 2016 21:30:15 +0200 +Subject: [PATCH libX11] Plug a memory leak + +This was introduced in 8ea762f. + +Reported-by: Julien Cristau +Signed-off-by: Emilio Pozuelo Monfort +Signed-off-by: Peter Hutterer +--- + src/FontNames.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/FontNames.c b/src/FontNames.c +index e55f338..3e23b5f 100644 +--- a/src/FontNames.c ++++ b/src/FontNames.c +@@ -98,12 +98,14 @@ int *actualCount) /* RETURN */ + *ch = '\0'; /* and replace with null-termination */ + count++; + } else { ++ Xfree(ch); + Xfree(flist); + flist = NULL; + count = 0; + break; + } + } else { ++ Xfree(ch); + Xfree(flist); + flist = NULL; + count = 0; +-- +2.9.3 + diff --git a/libX11.spec b/libX11.spec index a1df770..a5f6d29 100644 --- a/libX11.spec +++ b/libX11.spec @@ -5,7 +5,7 @@ Summary: Core X11 protocol client library Name: libX11 Version: 1.6.4 -Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} +Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist} License: MIT Group: System Environment/Libraries URL: http://www.x.org @@ -19,6 +19,8 @@ Source0: http://xorg.freedesktop.org/archive/individual/lib/%{name}-%{version}.t %endif Patch2: dont-forward-keycode-0.patch +Patch3: 0001-Plug-a-memory-leak.patch + BuildRequires: xorg-x11-util-macros >= 1.11 BuildRequires: pkgconfig(xproto) >= 7.0.15 BuildRequires: xorg-x11-xtrans-devel >= 1.0.3-4 @@ -50,6 +52,7 @@ X.Org X11 libX11 development package %prep %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} %patch2 -p1 -b .dont-forward-keycode-0 +%patch3 -p1 %build autoreconf -v --install --force @@ -109,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man5/*.5* %changelog +* Thu Jan 05 2017 Peter Hutterer 1.6.4-2 +- Plug a memory leak in XListFonts() + * Wed Oct 05 2016 Adam Jackson - 1.6.4-1 - libX11 1.6.4