Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
strstartswith() function is incorrect choice for finding parent directory so i change it to issubpath() function

Signed-off-by: Dmitrii Chervov <[email protected]>
  • Loading branch information
dschervov committed Feb 6, 2025
1 parent d4585a0 commit 985e525
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion criu/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static int find_dir(const char *path, struct list_head *dirs, struct cgroup_dir
return EXACT_MATCH;
}

if (strstartswith(path, d->path)) {
if (issubpath(path, d->path)) {
int ret = find_dir(path, &d->children, rdir);
if (ret == NO_MATCH) {
*rdir = d;
Expand Down

0 comments on commit 985e525

Please sign in to comment.