From: Jonathan Wakely Date: Tue, 8 Jul 2025 23:54:33 +0000 (+0100) Subject: libstdc++: Fix double free in new pool resource test [PR118681] X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb412029f5cec52275d14956fe01473015a9ce0e;p=thirdparty%2Fgcc.git libstdc++: Fix double free in new pool resource test [PR118681] This was supposed to free p1 and p2, not free p2 twice. libstdc++-v3/ChangeLog: PR libstdc++/118681 * testsuite/20_util/unsynchronized_pool_resource/118681.cc: Fix deallocate argument. --- diff --git a/libstdc++-v3/testsuite/20_util/unsynchronized_pool_resource/118681.cc b/libstdc++-v3/testsuite/20_util/unsynchronized_pool_resource/118681.cc index 87e1b1d9404..9935f793cf9 100644 --- a/libstdc++-v3/testsuite/20_util/unsynchronized_pool_resource/118681.cc +++ b/libstdc++-v3/testsuite/20_util/unsynchronized_pool_resource/118681.cc @@ -39,7 +39,7 @@ test_alignment(std::pmr::memory_resource& res, bool dealloc) if (dealloc) { - res.deallocate(p2, size, alignment); + res.deallocate(p1, size, alignment); res.deallocate(p2, size, alignment); } }