Skip to content

Commit

Permalink
talloc: ASAN fix for test_talloc_free_in_destructor
Browse files Browse the repository at this point in the history
Indirect leak of 104 byte(s) in 1 object(s) allocated from:
    #0 0x7f06393dfc08 in __interceptor_malloc (/lib64/libasan.so.5+0xefc08)
    #1 0x7f06392d0c45 in __talloc_with_prefix ../../talloc.c:782
    #2 0x7f06392d0c45 in __talloc ../../talloc.c:824
    #3 0x7f06392d0c45 in _talloc_named_const ../../talloc.c:981
    #4 0x7f06392d0c45 in talloc_named_const ../../talloc.c:1748
    #5 0x409edd in test_talloc_free_in_destructor ../../testsuite.c:1256
    #6 0x409edd in torture_local_talloc ../../testsuite.c:2138
    #7 0x402603 in main ../../testsuite_main.c:32
    #8 0x7f063908a412 in __libc_start_main (/lib64/libc.so.6+0x24412)

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org>
  • Loading branch information
sswen authored and abartlet committed Aug 21, 2019
1 parent 616646a commit 878e804
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/talloc/testsuite.c
Expand Up @@ -1266,6 +1266,8 @@ static bool test_talloc_free_in_destructor(void)

talloc_free(level0);

talloc_free(level3); /* make ASAN happy */

printf("success: free_in_destructor\n");
return true;
}
Expand Down

0 comments on commit 878e804

Please sign in to comment.