- libX11-1.1.4-xcb-xreply-leak.patch: Fix a leak when the client has a

non-fatal error handler. (mclasen, fdo #17616)
This commit is contained in:
Adam Jackson 2008-09-17 14:57:27 +00:00
parent 4c5fd0757d
commit 76dfd6e153
2 changed files with 45 additions and 1 deletions

View File

@ -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;
}

View File

@ -1,7 +1,7 @@
Summary: X.Org X11 libX11 runtime library Summary: X.Org X11 libX11 runtime library
Name: libX11 Name: libX11
Version: 1.1.4 Version: 1.1.4
Release: 2%{?dist} Release: 3%{?dist}
License: MIT License: MIT
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://www.x.org URL: http://www.x.org
@ -15,6 +15,8 @@ Patch0: libX11-0.99.3-datadir-locale-dir-fix.patch
# manually confirm each patch hunk before removal. # manually confirm each patch hunk before removal.
Patch2: dont-forward-keycode-0.patch Patch2: dont-forward-keycode-0.patch
Patch3: libX11-1.1.4-xcb-xreply-leak.patch
BuildRequires: pkgconfig BuildRequires: pkgconfig
# xproto >= 7.0.6 required # xproto >= 7.0.6 required
BuildRequires: xorg-x11-proto-devel >= 7.1-2 BuildRequires: xorg-x11-proto-devel >= 7.1-2
@ -54,6 +56,7 @@ X.Org X11 libX11 development package
# find it later. # find it later.
#%patch0 -p0 -b .datadir-locale-dir-fix #%patch0 -p0 -b .datadir-locale-dir-fix
%patch2 -p1 -b .dont-forward-keycode-0 %patch2 -p1 -b .dont-forward-keycode-0
%patch3 -p1 -b .xcb-xreply-leak
%build %build
%configure \ %configure \
@ -114,6 +117,10 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*.3* %{_mandir}/man3/*.3*
%changelog %changelog
* Wed Sep 17 2008 Adam Jackson <ajax@redhat.com> 1.1.4-3
- libX11-1.1.4-xcb-xreply-leak.patch: Fix a leak when the client has a
non-fatal error handler. (mclasen, fdo #17616)
* Tue Jul 15 2008 Adam Jackson <ajax@redhat.com> 1.1.4-2 * Tue Jul 15 2008 Adam Jackson <ajax@redhat.com> 1.1.4-2
- Fix license tag. - Fix license tag.