From: Swen Schillig Date: Thu, 15 Aug 2019 12:43:22 +0000 (+0200) Subject: talloc: ASAN fix for test_magic_protection X-Git-Tag: tevent-0.10.1~279 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc4ad5b6dfdcfb859f92dcca868a043e31a051b0;p=thirdparty%2Fsamba.git talloc: ASAN fix for test_magic_protection 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 --- 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;