chiark / gitweb /
mount: don't creat local-fs.target links for mount units when runnin in user mode
[elogind.git] / src / core / dbus-execute.c
index b79a4564555cbaf6718cf7557f8f94625a6df641..4e9529708d1742a859bb524b2759f831a0b87ad4 100644 (file)
@@ -29,6 +29,7 @@
 #include "fileio.h"
 #include "execute.h"
 #include "dbus-execute.h"
+#include "capability.h"
 
 BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput);
 
@@ -319,9 +320,8 @@ static int property_get_capabilities(
                 sd_bus_error *error) {
 
         ExecContext *c = userdata;
-        char *t = NULL;
+        _cleanup_cap_free_charp_ char *t = NULL;
         const char *s;
-        int r;
 
         assert(bus);
         assert(reply);
@@ -335,12 +335,7 @@ static int property_get_capabilities(
         if (!s)
                 return -ENOMEM;
 
-        r = sd_bus_message_append(reply, "s", s);
-
-        if (t)
-                cap_free(t);
-
-        return r;
+        return sd_bus_message_append(reply, "s", s);
 }
 
 static int property_get_syscall_filter(