Skip to content
Commit 6484ae5b authored by Carlos O'Donell's avatar Carlos O'Donell Committed by Florian Weimer
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>
(cherry picked from commit 3a7bed5f)
parent c5c666f3
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