From: Swen Schillig Date: Mon, 29 Jul 2019 08:00:26 +0000 (+0200) Subject: util: Free memory in genrand torture test to satisfy sanitizer X-Git-Tag: tdb-1.4.2~240 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=235288acaedf39ea386121347343d56df3d1d858;p=thirdparty%2Fsamba.git util: Free memory in genrand torture test to satisfy sanitizer Signed-off-by: Swen Schillig Reviewed-by: Andrew Bartlett Reviewed-by: Matthias Dieter Wallnöfer --- diff --git a/lib/util/tests/genrand.c b/lib/util/tests/genrand.c index 81c20bc386f..3987c33f25f 100644 --- a/lib/util/tests/genrand.c +++ b/lib/util/tests/genrand.c @@ -47,6 +47,8 @@ static bool test_generate_random_str(struct torture_context *tctx) torture_assert_int_equal(tctx, strlen(r), 10, "right length generated"); r = generate_random_str(mem_ctx, 5); torture_assert_int_equal(tctx, strlen(r), 5, "right length generated"); + + TALLOC_FREE(mem_ctx); return true; }