linux/lib/kunit
Jinjie Ruan 4b00920da1 kunit: Fix the wrong err path and add goto labels in kunit_filter_suites()
Take the last kfree(parsed_filters) and add it to be the first. Take
the first kfree(copy) and add it to be the last. The Best practice is to
return these errors reversely.

And as David suggested, add several labels which target only the things
which actually have been allocated so far.

Fixes: 529534e8cb ("kunit: Add ability to filter attributes")
Fixes: abbf73816b ("kunit: fix possible memory leak in kunit_filter_suites()")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Reviewed-by: Rae Moar <rmoar@google.com>
Suggested-by: David Gow <davidgow@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-09-05 12:29:55 -06:00
..
.kunitconfig
assert.c kunit: fix bug in KUNIT_EXPECT_MEMEQ 2023-01-30 14:46:46 -07:00
attributes.c kunit: fix struct kunit_attr header 2023-08-21 08:07:56 -06:00
debugfs.c kunit: include debugfs header file 2023-06-09 17:44:16 -07:00
debugfs.h
executor.c kunit: Fix the wrong err path and add goto labels in kunit_filter_suites() 2023-09-05 12:29:55 -06:00
executor_test.c kunit: test: Make filter strings in executor_test writable 2023-09-01 09:09:25 -06:00
hooks-impl.h kunit: Add printf attribute to fail_current_test_impl 2023-02-08 18:08:14 -07:00
hooks.c kunit: Add "hooks" to call into KUnit when it's built as a module 2023-02-08 14:26:25 -07:00
Kconfig kunit: Allow kunit test modules to use test filtering 2023-08-08 13:46:18 -06:00
kunit-example-test.c kunit: Add speed attribute 2023-07-26 13:29:04 -06:00
kunit-test.c kunit: Add kunit_add_action() to defer a call until test exit 2023-05-25 08:52:55 -06:00
Makefile kunit: Add test attributes API structure 2023-07-26 13:28:57 -06:00
resource.c kunit: Add kunit_add_action() to defer a call until test exit 2023-05-25 08:52:55 -06:00
static_stub.c kunit: Expose 'static stub' API to redirect functions 2023-02-08 14:28:17 -07:00
string-stream-test.c
string-stream.c kunit: alloc_string_stream_fragment error handling bug fix 2022-12-26 16:01:36 -07:00
string-stream.h kunit: drop test pointer in string_stream_fragment 2022-10-07 10:15:33 -06:00
test.c kunit: Fix wild-memory-access bug in kunit_free_suite_set() 2023-09-05 12:29:50 -06:00
try-catch-impl.h
try-catch.c