Skip to content

Commit 324c7ea

Browse files
committed
Fixes BOOST_POOL_VALGRIND code
This fixes an error that occurs when the user-allocator returns NULL.
1 parent 8911dd8 commit 324c7ea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/boost/pool/pool.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,8 @@ class pool
969969
if(free_list.empty())
970970
{
971971
ret = (user_allocator::malloc)(chunk_size);
972+
if ( ret == 0 )
973+
return ret;
972974
VALGRIND_MAKE_MEM_UNDEFINED(ret, chunk_size);
973975
}
974976
else

0 commit comments

Comments
 (0)