rpms/evolution-data-server/devel evolution-data-server-1.7.92-fix-fd-leak.patch, NONE, 1.1 evolution-data-server.spec, 1.117, 1.118

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Aug 28 14:49:59 UTC 2006


Author: rstrode

Update of /cvs/dist/rpms/evolution-data-server/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv5445

Modified Files:
	evolution-data-server.spec 
Added Files:
	evolution-data-server-1.7.92-fix-fd-leak.patch 
Log Message:
- Add patch from Veerapuram Varadhan to fix fd leak (bug 198935).


evolution-data-server-1.7.92-fix-fd-leak.patch:
 camel-filter-driver.c |   15 +++++++++++++++
 camel-filter-search.c |   15 +++++++++++++++
 2 files changed, 30 insertions(+)

--- NEW FILE evolution-data-server-1.7.92-fix-fd-leak.patch ---
--- evolution-2.7.92/camel/camel-filter-driver.c	12 Apr 2006 19:14:13 -0000	1.96
+++ evolution-2.7.92/camel/camel-filter-driver.c	28 Aug 2006 13:24:10 -0000
@@ -686,6 +686,9 @@ child_setup_func (gpointer user_data)
 typedef struct {
 	gint child_status;
 	GMainLoop *loop;
+	int fd_in;
+	int fd_out;
+	int fd_err;
 } child_watch_data_t;
 
 static void
@@ -699,6 +702,15 @@ child_watch (GPid     pid,
 
 	child_watch_data->child_status = status;
 
+	if (child_watch_data->fd_in != -1)
+		close (child_watch_data->fd_in);
+
+	if (child_watch_data->fd_out != -1)
+		close (child_watch_data->fd_out);
+
+	if (child_watch_data->fd_err != -1)
+		close (child_watch_data->fd_err);
+
 	g_main_loop_quit (child_watch_data->loop);
 }
 
@@ -803,6 +815,9 @@ pipe_to_system (struct _ESExp *f, int ar
 	
  wait:
 	child_watch_data.loop = g_main_loop_new (g_main_context_new (), FALSE);
+	child_watch_data.fd_in = pipe_to_child;
+	child_watch_data.fd_out = pipe_from_child;
+	child_watch_data.fd_err = -1;
 
 	source = g_child_watch_source_new (child_pid);
 	g_source_set_callback (source, (GSourceFunc) child_watch, &child_watch_data, NULL);
--- evolution-2.7.92/camel/camel-filter-search.c	20 Apr 2006 17:52:34 -0000	1.54
+++ evolution-2.7.92/camel/camel-filter-search.c	28 Aug 2006 13:24:10 -0000
@@ -521,6 +521,9 @@ child_setup_func (gpointer user_data)
 typedef struct {
 	gint child_status;
 	GMainLoop *loop;
+	int fd_in;
+	int fd_out;
+	int fd_err;
 } child_watch_data_t;
 
 static void
@@ -534,6 +537,15 @@ child_watch (GPid     pid,
 
 	child_watch_data->child_status = status;
 
+	if (child_watch_data->fd_in != -1)
+		close (child_watch_data->fd_in);
+
+	if (child_watch_data->fd_out != -1)
+		close (child_watch_data->fd_out);
+
+	if (child_watch_data->fd_err != -1)
+		close (child_watch_data->fd_err);
+
 	g_main_loop_quit (child_watch_data->loop);
 }
 
@@ -591,6 +603,9 @@ run_command (struct _ESExp *f, int argc,
 	camel_object_unref (stream);
 	
 	child_watch_data.loop = g_main_loop_new (g_main_context_new (), FALSE);
+	child_watch_data.fd_in = pipe_to_child;	
+	child_watch_data.fd_out = -1;
+	child_watch_data.fd_err = -1;
 
 	source = g_child_watch_source_new (child_pid);
 	g_source_set_callback (source, (GSourceFunc) child_watch, &child_watch_data, NULL);


Index: evolution-data-server.spec
===================================================================
RCS file: /cvs/dist/rpms/evolution-data-server/devel/evolution-data-server.spec,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -r1.117 -r1.118
--- evolution-data-server.spec	22 Aug 2006 18:15:38 -0000	1.117
+++ evolution-data-server.spec	28 Aug 2006 14:49:57 -0000	1.118
@@ -22,7 +22,7 @@
 
 Name: evolution-data-server
 Version: 1.7.92
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: LGPL
 Group: System Environment/Libraries
 Summary: Backend data server for Evolution
@@ -47,6 +47,9 @@
 # Gnome.org bug #349847
 Patch17: evolution-data-server-1.7.92-uninitialized-gerror.patch
 
+# RH bug #198935 / Gnome.org bug #350907
+Patch18: evolution-data-server-1.7.92-fix-fd-leak.patch
+
 ### Dependencies ###
 
 Requires: GConf2
@@ -131,6 +134,7 @@
 %patch15 -p1 -b .fix-edataserverui-libs
 %patch16 -p1 -b .maybe-fix-crash
 %patch17 -p1 -b .uninitialized-gerror
+%patch18 -p1 -b .fix-fd-leak
 
 mkdir -p krb5-fakeprefix/include
 mkdir -p krb5-fakeprefix/lib
@@ -333,6 +337,9 @@
 %{_libdir}/pkgconfig/libexchange-storage-%{eds_api_version}.pc
 
 %changelog
+* Mon Aug 28 2006 Ray Strode <rstrode at redhat.com> - 1.7.92-3.fc6
+- Add patch from Veerapuram Varadhan to fix fd leak (bug 198935).
+
 * Tue Aug 22 2006 Matthew Barnes <mbarnes at redhat.com> - 1.7.92-2
 - Add patch for Gnome.org bug #349847.
 




More information about the fedora-cvs-commits mailing list