mirror-linux/tools/testing
Yu Miao 7d8f3158a5 selftests/cgroup: Fix error path leaks in test_percpu_basic
When cg_name_indexed() returns NULL partway through the child creation
loop, the code returned -1 without running cleanup_children and cleanup.
That left the `parent` pathname allocation unreleased and did not remove
child cgroup directories already created under the parent. Fix by jumping
to cleanup_children instead of returning.

When cg_create() fails, `child` (the pathname from cg_name_indexed())
was not freed before cleanup_children. Fix by freeing `child` before
branching to cleanup_children.

Fixes: 90631e1dea ("kselftests: cgroup: add perpcu memory accounting test")
Signed-off-by: Yu Miao <yumiao@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
2026-05-13 08:40:52 -10:00
..
crypto/chacha20-s390
cxl
fault-injection
ktest ktest: Store failure logs also in fatal paths 2026-03-18 16:00:54 -04:00
kunit linux_kselftest-kunit-7.1-rc1 2026-04-14 17:39:42 -07:00
memblock
nvdimm
radix-tree maple_tree: use maple copy node for mas_wr_split() 2026-04-05 13:52:56 -07:00
rbtree
scatterlist
selftests selftests/cgroup: Fix error path leaks in test_percpu_basic 2026-05-13 08:40:52 -10:00
shared
vma mm: add mmap_action_map_kernel_pages[_full]() 2026-04-05 13:53:45 -07:00
vsock vsock/test: fix send_buf()/recv_buf() EINTR handling 2026-04-06 18:46:03 -07:00