]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/cgroup.c
macro: introduce TAKE_PTR() macro
[thirdparty/systemd.git] / src / core / cgroup.c
index 65ed86580f6e08f8e7453ade61570e4211a50d6b..62a3d86ef16a975e9cef7445f103c999bc92f89b 100644 (file)
@@ -1381,8 +1381,7 @@ int unit_set_cgroup_path(Unit *u, const char *path) {
 
         unit_release_cgroup(u);
 
-        u->cgroup_path = p;
-        p = NULL;
+        u->cgroup_path = TAKE_PTR(p);
 
         return 1;
 }