CID 716943: Using invalid iterator (INVALIDATE_ITERATOR)At (27): Dereferencing
iterator "p" though it is already past the end of its container.
The assert ensures that p will not be dereferenced if invalid.
Signed-off-by: Samuel Just <sam.just@inktank.com>
for (p = snapset.clones.begin(); p != snapset.clones.end(); p++)
if (*p == last)
break;
+ assert(p != snapset.clones.end());
object_stat_sum_t delta;
if (p != snapset.clones.begin()) {
// not the oldest... merge overlap into next older clone