stl_tempbuf.h (__detail::__return_temporary_buffer): Fix sized deallocation size...
authorFrançois Dumont <fdumont@gcc.gnu.org>
Fri, 19 Jul 2019 21:14:41 +0000 (21:14 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Fri, 19 Jul 2019 21:14:41 +0000 (21:14 +0000)
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

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_tempbuf.h

index d718a9dddbd0cc50cb8cd6e799b9b288c2edf3ab..f2d08cb08a70a0ba5203ab66485fc0834c2ceb75 100644 (file)
@@ -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.
index d746945a8f5df2329edb713169549aa1110ee8a6..c7d58a194c887143c1db22bf27fc1cf81686c0f0 100644 (file)
@@ -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