Skip to content
Commit 3a7bed5f authored by Carlos O'Donell's avatar Carlos O'Donell
Browse files

malloc: Fix -Wuse-after-free warning in tst-mallocalign1 [BZ #26779]



The test leaks bits from the freed pointer via the return value
in ret, and the compiler correctly identifies this issue.
We switch the test to use TEST_VERIFY and terminate the test
if any of the pointers return an unexpected alignment.

This fixes another -Wuse-after-free error when compiling glibc
with gcc 12.

Tested on x86_64 and i686 without regression.

Reviewed-by: default avatarSiddhesh Poyarekar <siddhesh@sourceware.org>
parent 4556b6ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment