summaryrefslogtreecommitdiffstats
path: root/bus/services.c
diff options
context:
space:
mode:
Diffstat (limited to 'bus/services.c')
-rw-r--r--bus/services.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bus/services.c b/bus/services.c
index 4392daa2..7a22dce7 100644
--- a/bus/services.c
+++ b/bus/services.c
@@ -319,8 +319,15 @@ bus_registry_acquire_service (BusRegistry *registry,
service_name);
if (!bus_selinux_allows_acquire_service (connection, sid,
- _dbus_string_get_const_data (service_name)))
+ _dbus_string_get_const_data (service_name), error))
{
+
+ if (dbus_error_is_set (error) &&
+ dbus_error_has_name (error, DBUS_ERROR_NO_MEMORY))
+ {
+ goto out;
+ }
+
dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED,
"Connection \"%s\" is not allowed to own the service \"%s\" due "
"to SELinux policy",