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