Message ID | 20230927090350.1220972-2-ruanjinjie@huawei.com |
---|---|
State | Accepted |
Commit | a6074cf0126b0bee51ab77a15930dc24a4d5db90 |
Headers | show |
Series | kunit: Fix some bugs in kunit | expand |
diff --git a/lib/kunit/executor.c b/lib/kunit/executor.c index a6348489d45f..a037a46fae5e 100644 --- a/lib/kunit/executor.c +++ b/lib/kunit/executor.c @@ -137,8 +137,10 @@ void kunit_free_suite_set(struct kunit_suite_set suite_set) { struct kunit_suite * const *suites; - for (suites = suite_set.start; suites < suite_set.end; suites++) + for (suites = suite_set.start; suites < suite_set.end; suites++) { + kfree((*suites)->test_cases); kfree(*suites); + } kfree(suite_set.start); }