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.
---

Tested x86_64-linux. Pushed to trunk.

Thanks to Daniel Boles for noticing this.

 .../testsuite/20_util/unsynchronized_pool_resource/118681.cc    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 87e1b1d94043..9935f793cf91 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);
       }
     }
-- 
2.50.0

Reply via email to