Skip to content

Commit e0d6caa

Browse files
authored
Merge pull request #846 from giuseppe/drop-duplicate-line
cgroup: do not lookup string twice
2 parents c655073 + bb57968 commit e0d6caa

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)