Skip to content
Commit 48c2bb0b authored by Jay Kamat's avatar Jay Kamat Committed by Shuah Khan (Samsung OSG)
Browse files

Fix cg_read_strcmp()



Fix a couple issues with cg_read_strcmp(), to improve correctness of
cgroup tests
- Fix cg_read_strcmp() always returning 0 for empty "needle" strings.
Previously, this function read to a size = 1 buffer when comparing
against empty strings, which would lead to cg_read_strcmp() comparing
two empty strings.
- Fix a memory leak in cg_read_strcmp()

Fixes: 84092dbc ("selftests: cgroup: add memory controller self-tests")

Signed-off-by: default avatarJay Kamat <jgkamat@fb.com>
Acked-by: default avatarRoman Gushchin <guro@fb.com>
Signed-off-by: default avatarShuah Khan (Samsung OSG) <shuah@kernel.org>
parent 7035c568
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment