commit | 64fb3962c0805c9c9ea9c43169aefb5a3aa240a2 | [log] [tgz] |
---|---|---|
author | Sagi Shahar <sagis@google.com> | Wed Sep 18 17:00:06 2019 -0700 |
committer | Sagi Shahar <sagis@google.com> | Wed Sep 18 17:00:06 2019 -0700 |
tree | e904d19630a515692be14f4a72db26892ea50561 | |
parent | 12ef96ed5c7ea005abffc829457796b9fb20505d [diff] |
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 @@ } this->add(this, other_content); + kfree(other_content); } static void test_stream_clear(struct test_stream *this)