From 985e5253dbb3fd26b5b335d0eea419ec95064ca0 Mon Sep 17 00:00:00 2001 From: dschervov Date: Wed, 5 Feb 2025 20:04:37 +0300 Subject: [PATCH] bug fix strstartswith() function is incorrect choice for finding parent directory so i change it to issubpath() function Signed-off-by: Dmitrii Chervov --- criu/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/criu/cgroup.c b/criu/cgroup.c index fcaed07080..9246be6390 100644 --- a/criu/cgroup.c +++ b/criu/cgroup.c @@ -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;