summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--bus/dispatch.c3
-rw-r--r--dbus/dbus-address.c5
3 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index f38c924a..3f540c76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
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
the watch
diff --git a/bus/dispatch.c b/bus/dispatch.c
index b4b03d96..4f550f9a 100644
--- a/bus/dispatch.c
+++ b/bus/dispatch.c
@@ -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);
diff --git a/dbus/dbus-address.c b/dbus/dbus-address.c
index 87a99bd8..ef8a51da 100644
--- a/dbus/dbus-address.c
+++ b/dbus/dbus-address.c
@@ -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;
}