mirror of
https://github.com/boostorg/beast.git
synced 2025-07-30 12:57:31 +02:00
Fix leak in basic_flat_buffer
This commit is contained in:
@ -3,6 +3,7 @@ Version 47
|
|||||||
* Disable operator<< for buffer_body
|
* Disable operator<< for buffer_body
|
||||||
* buffer_size overload for basic_multi_buffer::const_buffers_type
|
* buffer_size overload for basic_multi_buffer::const_buffers_type
|
||||||
* Fix undefined behavior in pausation
|
* Fix undefined behavior in pausation
|
||||||
|
* Fix leak in basic_flat_buffer
|
||||||
|
|
||||||
API Changes:
|
API Changes:
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ prepare(std::size_t n) ->
|
|||||||
detail::next_pow2(len + n), min_size));
|
detail::next_pow2(len + n), min_size));
|
||||||
auto const p = alloc_traits::allocate(
|
auto const p = alloc_traits::allocate(
|
||||||
this->member(), new_size);
|
this->member(), new_size);
|
||||||
if(len > 0)
|
if(p_)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(p);
|
BOOST_ASSERT(p);
|
||||||
BOOST_ASSERT(in_);
|
BOOST_ASSERT(in_);
|
||||||
@ -266,7 +266,7 @@ reserve(std::size_t n)
|
|||||||
auto const p = alloc_traits::allocate(
|
auto const p = alloc_traits::allocate(
|
||||||
this->member(), new_size);
|
this->member(), new_size);
|
||||||
auto const len = size();
|
auto const len = size();
|
||||||
if(len > 0)
|
if(p_)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(p_);
|
BOOST_ASSERT(p_);
|
||||||
BOOST_ASSERT(in_);
|
BOOST_ASSERT(in_);
|
||||||
|
Reference in New Issue
Block a user