From 76dfd6e153ff4f42585e20b90ca8ac8f73aad9a4 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 17 Sep 2008 14:57:27 +0000 Subject: [PATCH] - libX11-1.1.4-xcb-xreply-leak.patch: Fix a leak when the client has a non-fatal error handler. (mclasen, fdo #17616) --- libX11-1.1.4-xcb-xreply-leak.patch | 37 ++++++++++++++++++++++++++++++ libX11.spec | 9 +++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 libX11-1.1.4-xcb-xreply-leak.patch diff --git a/libX11-1.1.4-xcb-xreply-leak.patch b/libX11-1.1.4-xcb-xreply-leak.patch new file mode 100644 index 0000000..61b1502 --- /dev/null +++ b/libX11-1.1.4-xcb-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/libX11.spec b/libX11.spec index 34b3b11..34561f5 100644 --- a/libX11.spec +++ b/libX11.spec @@ -1,7 +1,7 @@ Summary: X.Org X11 libX11 runtime library Name: libX11 Version: 1.1.4 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT Group: System Environment/Libraries 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. Patch2: dont-forward-keycode-0.patch +Patch3: libX11-1.1.4-xcb-xreply-leak.patch + BuildRequires: pkgconfig # xproto >= 7.0.6 required BuildRequires: xorg-x11-proto-devel >= 7.1-2 @@ -54,6 +56,7 @@ X.Org X11 libX11 development package # find it later. #%patch0 -p0 -b .datadir-locale-dir-fix %patch2 -p1 -b .dont-forward-keycode-0 +%patch3 -p1 -b .xcb-xreply-leak %build %configure \ @@ -114,6 +117,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man3/*.3* %changelog +* Wed Sep 17 2008 Adam Jackson 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 1.1.4-2 - Fix license tag.