Skip to content

Commit

Permalink
util: Free memory in genrand torture test to satisfy sanitizer
Browse files Browse the repository at this point in the history
Signed-off-by: Swen Schillig <[email protected]>
Reviewed-by: Andrew Bartlett <[email protected]>
Reviewed-by: Matthias Dieter Wallnöfer <[email protected]>
  • Loading branch information
sswen authored and abartlet committed Aug 8, 2019

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent d167fb4 commit 235288a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/util/tests/genrand.c
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 235288a

Please sign in to comment.