Bug 719315: Free unused chunks. (r=luke)

This commit is contained in:
Chris Leary 2012-01-18 18:55:01 -08:00
parent 8500adc8ac
commit ab18051b4f

View File

@ -143,8 +143,12 @@ LifoAlloc::freeUnused()
}
/* Free all chunks after |latest|. */
for (BumpChunk *victim = latest->next(); victim; victim = victim->next())
BumpChunk *it = latest->next();
while (it) {
BumpChunk *victim = it;
it = it->next();
BumpChunk::delete_(victim);
}
latest->setNext(NULL);
}