Skip to content

Commit

Permalink
talloc: ASAN fix for test_magic_protection
Browse files Browse the repository at this point in the history
Direct leak of 1152 byte(s) in 1 object(s) allocated from:
     #0 0x7f06393dfc08 in __interceptor_malloc (/lib64/libasan.so.5+0xefc08)
     samba-team#1 0x7f06392cfd59 in __talloc_with_prefix ../../talloc.c:782
     samba-team#2 0x7f06392cfd59 in _talloc_pool ../../talloc.c:837
     samba-team#3 0x7f06392cfd59 in talloc_pool ../../talloc.c:859
     samba-team#4 0x40b83c in test_magic_protection ../../testsuite.c:1960
     samba-team#5 0x40b83c in torture_local_talloc ../../testsuite.c:2164
     samba-team#6 0x402603 in main ../../testsuite_main.c:32
     samba-team#7 0x7f063908a412 in __libc_start_main (/lib64/libc.so.6+0x24412)

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 21, 2019
1 parent d0933ec commit fc4ad5b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/talloc/testsuite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fc4ad5b

Please sign in to comment.