From 2be3193b827839550e6ac938b28d805f2bc294c3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Dumont?= Date: Fri, 19 Jul 2019 21:14:41 +0000 Subject: [PATCH] stl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size computation. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2019-07-19 François Dumont * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size computation. From-SVN: r273609 --- libstdc++-v3/ChangeLog | 5 +++++ libstdc++-v3/include/bits/stl_tempbuf.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d718a9dddbd..f2d08cb08a7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2019-07-19 François Dumont + + * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix + sized deallocation size computation. + 2019-07-19 Andreas Schwab * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update. diff --git a/libstdc++-v3/include/bits/stl_tempbuf.h b/libstdc++-v3/include/bits/stl_tempbuf.h index d746945a8f5..c7d58a194c8 100644 --- a/libstdc++-v3/include/bits/stl_tempbuf.h +++ b/libstdc++-v3/include/bits/stl_tempbuf.h @@ -71,7 +71,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION size_t __len __attribute__((__unused__))) { #if __cpp_sized_deallocation - ::operator delete(__p, __len); + ::operator delete(__p, __len * sizeof(_Tp)); #else ::operator delete(__p); #endif -- 2.30.2