From 5e95f07ded7522dafd4b012b662bfc5d667c6e41 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 4 Apr 2011 15:41:32 +0100 Subject: [PATCH 2/5] invoke_object_method: if dbus_message_new_method_return fails, fail hard There's no point in doing graceful unwinding here, since it really shouldn't happen. --- dbus/dbus-gobject.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index c8834f9..8276d77 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -1784,8 +1784,10 @@ invoke_object_method (GObject *object, if (send_reply) { reply = dbus_message_new_method_return (message); + /* this can only fail through a programming error in dbus-glib + * itself (passing a bad message), or OOM */ if (reply == NULL) - goto nomem; + g_error ("dbus_message_new_method_return failed: out of memory?"); /* Append output arguments to reply */ dbus_message_iter_init_append (reply, &iter); -- 1.7.4.1