dbus/dbus dbus-spawn.c, 1.17, 1.18 dbus-sysdeps.c, 1.77, 1.78 dbus-userdb.c, 1.10, 1.11

Havoc Pennington hp at freedesktop.org
Sat Aug 28 19:14:55 PDT 2004


Update of /cvs/dbus/dbus/dbus
In directory gabe:/tmp/cvs-serv4528/dbus

Modified Files:
	dbus-spawn.c dbus-sysdeps.c dbus-userdb.c 
Log Message:
2004-08-28  Havoc Pennington  <hp at redhat.com>

	* dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable

        More fixes from Steve Grubb
	
	* dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
	(_dbus_listen_tcp_socket): fix fd leak

	* dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
	EINTR to a bit lower in the code



Index: dbus-spawn.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-spawn.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- dbus-spawn.c	10 Aug 2004 03:07:00 -0000	1.17
+++ dbus-spawn.c	29 Aug 2004 02:14:52 -0000	1.18
@@ -72,13 +72,13 @@
     {
       size_t chunk;
       size_t to_read;
-      
-    again:
 
       to_read = sizeof (int) * n_ints_in_buf - bytes;
 
       if (to_read == 0)
         break;
+
+    again:
       
       chunk = read (fd,
                     ((char*)buf) + bytes,
@@ -128,11 +128,12 @@
       size_t chunk;    
       size_t to_read;
       
-    again:
       to_read = sizeof (pid_t) - bytes;
 
       if (to_read == 0)
         break;
+
+    again:
       
       chunk = read (fd,
                     ((char*)buf) + bytes,

Index: dbus-sysdeps.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- dbus-sysdeps.c	25 Aug 2004 22:11:49 -0000	1.77
+++ dbus-sysdeps.c	29 Aug 2004 02:14:52 -0000	1.78
@@ -622,6 +622,7 @@
                       _dbus_error_from_errno (errno),
                       "Failed to lookup hostname: %s",
                       host);
+      close (fd);
       return -1;
     }
   
@@ -695,6 +696,7 @@
                       _dbus_error_from_errno (errno),
                       "Failed to lookup hostname: %s",
                       host);
+      close (listen_fd);
       return -1;
     }
   

Index: dbus-userdb.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-userdb.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- dbus-userdb.c	25 Aug 2004 22:11:49 -0000	1.10
+++ dbus-userdb.c	29 Aug 2004 02:14:52 -0000	1.11
@@ -413,7 +413,6 @@
 
   DBusUserDatabase *db;
   const DBusUserInfo *info;
-  DBusString *console_file;
   dbus_bool_t result = FALSE; 
 
   _dbus_user_database_lock_system ();



More information about the dbus-commit mailing list