Make some sanitizers happier avoiding wraparound.

This commit is contained in:
Ion Gaztañaga
2018-09-29 09:58:52 +02:00
parent 0b39d57b6a
commit 76b181f024

View File

@@ -93,7 +93,8 @@ struct allocator_version_traits<Allocator, 1>
{
size_type n = holder.size();
typename multiallocation_chain::iterator it = holder.begin();
while(n--){
while(n){
--n;
pointer p = boost::intrusive::pointer_traits<pointer>::pointer_to(*it);
++it;
a.deallocate(p, 1);