Skip to content

Commit bb57968

Browse files
committed
cgroup: do not lookup string twice
Signed-off-by: Giuseppe Scrivano <[email protected]>
1 parent c655073 commit bb57968

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcrun/cgroup-setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ read_unified_cgroup_pid (pid_t pid, char **path, libcrun_error_t *err)
270270
return crun_make_error (err, -1, "cannot find cgroup2 for the process %d", pid);
271271

272272
from += 3;
273-
to = strchr (from, '\n');
273+
274274
to = strchr (from, '\n');
275275
if (UNLIKELY (to == NULL))
276276
return crun_make_error (err, -1, "cannot parse `%s`", cgroup_path);

0 commit comments

Comments
 (0)