Skip to content

Commit e00d067

Browse files
committed
Pass the right size to __libcpp_deallocate()
1 parent 9733748 commit e00d067

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/__utility/small_buffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class __small_buffer {
7575
template <class _Stored>
7676
_LIBCPP_HIDE_FROM_ABI void __dealloc() noexcept {
7777
if constexpr (!__fits_in_buffer<_Stored>)
78-
std::__libcpp_deallocate(*reinterpret_cast<void**>(__buffer_), _BufferSize * sizeof(byte), alignof(_Stored));
78+
std::__libcpp_deallocate(*reinterpret_cast<void**>(__buffer_), sizeof(_Stored), alignof(_Stored));
7979
}
8080

8181
template <class _Stored, class... _Args>

0 commit comments

Comments
 (0)