]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
2003-03-16 Havoc Pennington <hp@pobox.com>
authorHavoc Pennington <hp@redhat.com>
Mon, 17 Mar 2003 02:20:18 +0000 (02:20 +0000)
committerHavoc Pennington <hp@redhat.com>
Mon, 17 Mar 2003 02:20:18 +0000 (02:20 +0000)
* bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
connections

* dbus/dbus-address.c (create_entry): fix OOM handling when
failing to alloc entry->method

ChangeLog
bus/dispatch.c
dbus/dbus-address.c

index f38c924ab61ccfbfc067ed7adf64a63565feaff5..3f540c76f00a8b42800aabaa46662238fe1fcde3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-03-16  Havoc Pennington  <hp@pobox.com>
+
+       * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
+       connections
+
+       * dbus/dbus-address.c (create_entry): fix OOM handling when
+       failing to alloc entry->method
+
 2003-03-16  Havoc Pennington  <hp@pobox.com>
 
        * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
index b4b03d96c2b83b4eebb8cc6a203f2d26658d6e9b..4f550f9aa7ed0986ca9d5510abf125d47293722f 100644 (file)
@@ -984,19 +984,16 @@ bus_dispatch_test (const DBusString *test_data_dir)
   dbus_connection_disconnect (foo);
   if (bus_connection_dispatch_one_message (foo))
     _dbus_assert_not_reached ("extra message in queue");
-  dbus_connection_unref (foo);
   _dbus_assert (!bus_test_client_listed (foo));
 
   dbus_connection_disconnect (bar);
   if (bus_connection_dispatch_one_message (bar))
     _dbus_assert_not_reached ("extra message in queue");
-  dbus_connection_unref (bar);
   _dbus_assert (!bus_test_client_listed (bar));
 
   dbus_connection_disconnect (baz);
   if (bus_connection_dispatch_one_message (baz))
     _dbus_assert_not_reached ("extra message in queue");
-  dbus_connection_unref (baz);
   _dbus_assert (!bus_test_client_listed (baz));
 
   bus_context_unref (context);
index 87a99bd815d4995777bdb5b2c27440840904ad11..ef8a51da2a9c8ecb0fe951f2e46029927fd66efa 100644 (file)
@@ -98,7 +98,10 @@ create_entry (void)
     return NULL;
 
   if (!_dbus_string_init (&entry->method, _DBUS_INT_MAX))
-    dbus_free (entry);
+    {
+      dbus_free (entry);
+      return NULL;
+    }
 
   return entry;
 }