From c239a810543bde85dd458012612874cdc81a4151 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 4 Apr 2011 15:41:32 +0100 Subject: 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. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35767 Reviewed-by: Cosimo Alfarano --- dbus/dbus-gobject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index 54a5e22..0494c8a 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -1807,8 +1807,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); -- cgit v1.2.3