diff options
Diffstat (limited to 'src/basic/cgroup-util.c')
-rw-r--r-- | src/basic/cgroup-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c index 5370090f00..8b1e051d56 100644 --- a/src/basic/cgroup-util.c +++ b/src/basic/cgroup-util.c @@ -799,7 +799,7 @@ int cg_pid_get_path(const char *controller, pid_t pid, char **ret_path) { continue; } - char *path = strdup(e + 1); + _cleanup_free_ char *path = strdup(e + 1); if (!path) return -ENOMEM; @@ -812,7 +812,7 @@ int cg_pid_get_path(const char *controller, pid_t pid, char **ret_path) { if (e) *e = 0; - *ret_path = path; + *ret_path = TAKE_PTR(path); return 0; } } |