From 7941ee17f895abf148babf8da6f6fcea3e9a1484 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 5 Apr 2011 15:43:30 +0100 Subject: [PATCH 08/15] object_registration_message: check for OOM when a property is absent Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35766 --- dbus/dbus-gobject.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dbus/dbus-gobject.c b/dbus/dbus-gobject.c index 008925c..3baa860 100644 --- a/dbus/dbus-gobject.c +++ b/dbus/dbus-gobject.c @@ -2163,9 +2163,11 @@ object_registration_message (DBusConnection *connection, } else { - ret = dbus_message_new_error_printf (message, - DBUS_ERROR_INVALID_ARGS, - "No such property %s", requested_propname); + gchar *error_message = g_strdup_printf ("No such property %s", + requested_propname); + + ret = error_or_die (message, DBUS_ERROR_INVALID_ARGS, error_message); + g_free (error_message); } } -- 1.7.4.1