dbus/dbus dbus-sysdeps.c,1.78,1.79

Olivier Andrieu oandrieu at freedesktop.org
Fri Sep 17 09:14:51 UTC 2004


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

Modified Files:
	dbus-sysdeps.c 
Log Message:
* dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.

* doc/busconfig.dtd: update the DTD for the at_console attribute.

* bus/driver.c (bus_driver_handle_hello): correctly handle Hello
messages after the first one (bug #1389).

* bus/dispatch.c (check_double_hello_message): add a test case for the
double hello message bug.  (check_existent_service_activation): fix
check of spawning error.


Index: dbus-sysdeps.c
===================================================================
RCS file: /cvs/dbus/dbus/dbus/dbus-sysdeps.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- dbus-sysdeps.c	29 Aug 2004 02:14:52 -0000	1.78
+++ dbus-sysdeps.c	17 Sep 2004 09:14:49 -0000	1.79
@@ -3359,26 +3359,29 @@
   DBusString f;
   dbus_bool_t result;
 
+  result = FALSE;
   if (!_dbus_string_init (&f))
     {
-      dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
+      _DBUS_SET_OOM (error);
       return FALSE;
     }
 
   if (!_dbus_string_append (&f, DBUS_CONSOLE_DIR))
     {
-      dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
-      return FALSE;
+      _DBUS_SET_OOM (error);
+      goto out;
     }
 
 
   if (!_dbus_string_append (&f, username))
     {
-      dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
-      return FALSE;
+      _DBUS_SET_OOM (error);
+      goto out;
     }
 
   result = _dbus_file_exists (_dbus_string_get_const_data (&f));
+
+ out:
   _dbus_string_free (&f);
 
   return result;



More information about the dbus-commit mailing list