]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/cgroup-show.c
tree-wide: use TAKE_PTR() and TAKE_FD() macros
[thirdparty/systemd.git] / src / shared / cgroup-show.c
index 326a3980752eba9c8a3f543bcf8e70201d3f14f7..ae2bfadffc325d5c83c0d58ec47bdb886d9ad833 100644 (file)
@@ -385,10 +385,8 @@ int show_cgroup_get_path_and_warn(
                         return log_oom();
 
                 *ret = t;
-        } else {
-                *ret = root;
-                root = NULL;
-        }
+        } else
+                *ret = TAKE_PTR(root);
 
         return 0;
 }