From 6c92f0e316647c06bff17544036ea54e0a80e321 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 25 Sep 2008 18:38:31 +0000 Subject: [PATCH] - libxcb-1.1-xreply-leak.patch: Plug a memory leak in _XReply when the caller has a non-fatal error handler. (mclasen, fdo #17616) --- libxcb-1.1-xreply-leak.patch | 37 ++++++++++++++++++++++++++++++++++++ libxcb.spec | 8 +++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 libxcb-1.1-xreply-leak.patch diff --git a/libxcb-1.1-xreply-leak.patch b/libxcb-1.1-xreply-leak.patch new file mode 100644 index 0000000..61b1502 --- /dev/null +++ b/libxcb-1.1-xreply-leak.patch @@ -0,0 +1,37 @@ +--- libX11-1.1.4/src/xcb_io.c 2008-03-06 15:45:06.000000000 -0500 ++++ hacked/src/xcb_io.c 2008-09-17 00:40:57.000000000 -0400 +@@ -396,15 +396,18 @@ + { + case X_LookupColor: + case X_AllocNamedColor: ++ free(error); + return 0; + } + break; + case BadFont: + if(err->majorCode == X_QueryFont) ++ free(error); + return 0; + break; + case BadAlloc: + case BadAccess: ++ free(error); + return 0; + } + +@@ -413,10 +416,13 @@ + * want to suppress the error. + */ + for(ext = dpy->ext_procs; ext; ext = ext->next) +- if(ext->error && ext->error(dpy, err, &ext->codes, &ret_code)) ++ if(ext->error && ext->error(dpy, err, &ext->codes, &ret_code)) { ++ free(error); + return ret_code; ++ } + +- _XError(dpy, (xError *) error); ++ _XError(dpy, err); ++ free(error); + return 0; + } + diff --git a/libxcb.spec b/libxcb.spec index 53eff29..3be6891 100644 --- a/libxcb.spec +++ b/libxcb.spec @@ -1,6 +1,6 @@ Name: libxcb Version: 1.1.91 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A C binding to the X11 protocol Group: System Environment/Libraries @@ -12,6 +12,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch0: libxcb-1.1-no-pthread-stubs.patch Patch1: libxcb-1.1-abstract-socket.patch Patch2: libxcb-1.1-sloppy-lock.patch +Patch3: libxcb-1.1-xreply-leak.patch BuildRequires: autoconf automake libtool pkgconfig BuildRequires: doxygen @@ -50,6 +51,7 @@ The %{name}-doc package contains documentation for the %{name} library. %patch0 -p1 -b .pthread-stubs %patch1 -p1 -b .abstract %patch2 -p1 -b .sloppier +%patch3 -p1 -b .xreply-leak %build autoreconf -v --install @@ -84,6 +86,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/doc/%{name}-%{version} %changelog +* Wed Sep 17 2008 Adam Jackson 1.1.91-3 +- libxcb-1.1-xreply-leak.patch: Plug a memory leak in _XReply when the + caller has a non-fatal error handler. (mclasen, fdo #17616) + * Thu Sep 11 2008 Adam Jackson 1.1.91-2 - Enable x-selinux bindings.