git.samba.org
/
garming
/
samba-autobuild
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
util: Free memory in genrand torture test to satisfy sanitizer
[garming/samba-autobuild/.git]
/
lib
/
util
/
tests
/
genrand.c
diff --git
a/lib/util/tests/genrand.c
b/lib/util/tests/genrand.c
index 81c20bc386f4e1a86ae543df64c1625d4b41342f..3987c33f25f764303b7d52e4eece3c7b27f1dfe1 100644
(file)
--- 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;
}