kunit: Fix memory leak in test_stream_append get_string() returns a new allocated string which needs to be freed after use. Signed-off-by: Sagi Shahar <sagis@google.com> Change-Id: I0df8b379445a077500aa4ec9a6177ea440a0925d
diff --git a/test/test-stream.c b/test/test-stream.c index f9869ad..43f28c4 100644 --- a/test/test-stream.c +++ b/test/test-stream.c
@@ -44,6 +44,7 @@ static void test_stream_append(struct test_stream *this, } this->add(this, other_content); + kfree(other_content); } static void test_stream_clear(struct test_stream *this)