rpms/libxcb/devel libxcb-1.1-xreply-leak.patch, NONE, 1.1 libxcb.spec, 1.9, 1.10

Adam Jackson ajax at fedoraproject.org
Thu Sep 25 18:39:01 UTC 2008


Author: ajax

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

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


libxcb-1.1-xreply-leak.patch:

--- NEW FILE libxcb-1.1-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: libxcb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libxcb/devel/libxcb.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- libxcb.spec	11 Sep 2008 19:11:18 -0000	1.9
+++ libxcb.spec	25 Sep 2008 18:38:31 -0000	1.10
@@ -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 @@
 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 @@
 %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 @@
 %{_datadir}/doc/%{name}-%{version}
 
 %changelog
+* Wed Sep 17 2008 Adam Jackson <ajax at redhat.com> 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 <ajax at redhat.com> 1.1.91-2
 - Enable x-selinux bindings.
 




More information about the fedora-extras-commits mailing list