[PATCH] [cgroup/testing] cg_read_strcmp: Fix null pointer dereference

2020-07-25 Thread Gaurav Singh
Haven't reproduced this issue. This PR is does a minor code cleanup. Signed-off-by: Gaurav Singh --- tools/testing/selftests/cgroup/cgroup_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/cgroup/cgroup_util.c b/tools/testing/selftests/cgroup/cg

Re: [PATCH] [cgroup/testing] cg_read_strcmp: Fix null pointer dereference

2020-07-25 Thread Chris Down
Gaurav Singh writes: Passing NULL in strcmp will cause a segmentation fault. Fix this by returning -1 if expected is NULL pointer. Did you actually encounter this while running the tests?

[PATCH] [cgroup/testing] cg_read_strcmp: Fix null pointer dereference

2020-07-25 Thread Gaurav Singh
Passing NULL in strcmp will cause a segmentation fault. Fix this by returning -1 if expected is NULL pointer. Signed-off-by: Gaurav Singh --- tools/testing/selftests/cgroup/cgroup_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/cgroup/cgroup_ut