From fc4ad5b6dfdcfb859f92dcca868a043e31a051b0 Mon Sep 17 00:00:00 2001 From: Swen Schillig Date: Thu, 15 Aug 2019 14:43:22 +0200 Subject: talloc: ASAN fix for test_magic_protection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Direct leak of 1152 byte(s) in 1 object(s) allocated from: #0 0x7f06393dfc08 in __interceptor_malloc (/lib64/libasan.so.5+0xefc08) #1 0x7f06392cfd59 in __talloc_with_prefix ../../talloc.c:782 #2 0x7f06392cfd59 in _talloc_pool ../../talloc.c:837 #3 0x7f06392cfd59 in talloc_pool ../../talloc.c:859 #4 0x40b83c in test_magic_protection ../../testsuite.c:1960 #5 0x40b83c in torture_local_talloc ../../testsuite.c:2164 #6 0x402603 in main ../../testsuite_main.c:32 #7 0x7f063908a412 in __libc_start_main (/lib64/libc.so.6+0x24412) Signed-off-by: Swen Schillig Reviewed-by: Andrew Bartlett Reviewed-by: Matthias Dieter Wallnöfer --- lib/talloc/testsuite.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/talloc') diff --git a/lib/talloc/testsuite.c b/lib/talloc/testsuite.c index ffede68f52a..aa5c771ea31 100644 --- a/lib/talloc/testsuite.c +++ b/lib/talloc/testsuite.c @@ -1999,6 +1999,8 @@ static bool test_magic_protection(void) while (wait(&exit_status) != pid); + talloc_free(pool); /* make ASAN happy */ + if (!WIFEXITED(exit_status)) { printf("Child exited through unexpected abnormal means\n"); return false; -- cgit v1.2.1