Fix leak in basic_flat_buffer

This commit is contained in:
Vinnie Falco
2017-06-03 00:14:49 -07:00
parent 55fbf76689
commit 1ee3013261
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -220,7 +220,7 @@ prepare(std::size_t n) ->
detail::next_pow2(len + n), min_size));
auto const p = alloc_traits::allocate(
this->member(), new_size);
if(len > 0)
if(p_)
{
BOOST_ASSERT(p);
BOOST_ASSERT(in_);
@@ -266,7 +266,7 @@ reserve(std::size_t n)
auto const p = alloc_traits::allocate(
this->member(), new_size);
auto const len = size();
if(len > 0)
if(p_)
{
BOOST_ASSERT(p_);
BOOST_ASSERT(in_);