chiark / gitweb /
bus: unref buscreds on failure
[elogind.git] / src / libsystemd / sd-bus / bus-control.c
index ecf74919b67b4989446bb176636f236a3f63d074..ad372f6772c5b8a3b795f5636ad4ac1c96eac30c 100644 (file)
@@ -495,11 +495,9 @@ static int bus_get_owner_kdbus(
                                         goto fail;
                                 }
 
-                                if (!bus->cgroup_root) {
-                                        r = cg_get_root_path(&bus->cgroup_root);
-                                        if (r < 0)
-                                                goto fail;
-                                }
+                                r = bus_get_root_path(bus);
+                                if (r < 0)
+                                        goto fail;
 
                                 c->cgroup_root = strdup(bus->cgroup_root);
                                 if (!c->cgroup_root) {
@@ -1140,7 +1138,6 @@ int bus_add_match_internal(
                 uint64_t cookie) {
 
         assert(bus);
-        assert(match);
 
         if (bus->is_kernel)
                 return bus_add_match_internal_kernel(bus, components, n_components, cookie);
@@ -1197,7 +1194,6 @@ int bus_remove_match_internal(
                 uint64_t cookie) {
 
         assert(bus);
-        assert(match);
 
         if (bus->is_kernel)
                 return bus_remove_match_internal_kernel(bus, cookie);