diff options
author | François Dumont <fdumont@gcc.gnu.org> | 2019-07-19 21:14:41 +0000 |
---|---|---|
committer | François Dumont <fdumont@gcc.gnu.org> | 2019-07-19 21:14:41 +0000 |
commit | 2be3193b827839550e6ac938b28d805f2bc294c3 (patch) | |
tree | 25e80b9ad5a28d328c0771848e1eac648af3135e | |
parent | db67ea0f935148714d465defe743533715b735a4 (diff) | |
download | gcc-2be3193b827839550e6ac938b28d805f2bc294c3.zip gcc-2be3193b827839550e6ac938b28d805f2bc294c3.tar.gz gcc-2be3193b827839550e6ac938b28d805f2bc294c3.tar.bz2 |
stl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size computation.
2019-07-19 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
sized deallocation size computation.
From-SVN: r273609
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/stl_tempbuf.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d718a9d..f2d08cb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2019-07-19 François Dumont <fdumont@gcc.gnu.org> + + * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix + sized deallocation size computation. + 2019-07-19 Andreas Schwab <schwab@linux-m68k.org> * 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 d746945..c7d58a1 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 |