rpms/libX11/devel libX11-1.1.4-xcb-xreply-leak.patch, NONE, 1.1 libX11.spec, 1.46, 1.47

Adam Jackson ajax at fedoraproject.org
Wed Sep 17 14:57:57 UTC 2008


Author: ajax

Update of /cvs/pkgs/rpms/libX11/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31483

Modified Files:
	libX11.spec 
Added Files:
	libX11-1.1.4-xcb-xreply-leak.patch 
Log Message:
* Wed Sep 17 2008 Adam Jackson <ajax at 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)


libX11-1.1.4-xcb-xreply-leak.patch:

--- NEW FILE libX11-1.1.4-xcb-xreply-leak.patch ---
--- 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;
 	}
 


Index: libX11.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libX11/devel/libX11.spec,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- libX11.spec	15 Jul 2008 17:24:31 -0000	1.46
+++ libX11.spec	17 Sep 2008 14:57:27 -0000	1.47
@@ -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 @@
 # 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 @@
 # 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 @@
 %{_mandir}/man3/*.3*
 
 %changelog
+* Wed Sep 17 2008 Adam Jackson <ajax at 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 at redhat.com> 1.1.4-2
 - Fix license tag.
 




More information about the fedora-extras-commits mailing list