summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/kunit/debugfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/kunit/debugfs.c b/lib/kunit/debugfs.c
index d548750a325a..b25d214b93e1 100644
--- a/lib/kunit/debugfs.c
+++ b/lib/kunit/debugfs.c
@@ -212,8 +212,11 @@ void kunit_debugfs_create_suite(struct kunit_suite *suite)
err:
string_stream_destroy(suite->log);
- kunit_suite_for_each_test_case(suite, test_case)
+ suite->log = NULL;
+ kunit_suite_for_each_test_case(suite, test_case) {
string_stream_destroy(test_case->log);
+ test_case->log = NULL;
+ }
}
void kunit_debugfs_destroy_suite(struct kunit_suite *suite)