From: François Dumont Date: Fri, 19 Jul 2019 21:14:41 +0000 (+0000) Subject: stl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2be3193b827839550e6ac938b28d805f2bc294c3;p=gcc.git stl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size computation. 2019-07-19 François Dumont * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size computation. From-SVN: r273609 --- 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