D41175 introduced a condition, where free could be called
while in a critical section or under spinlock.
Refactoring the code to perform the batch processing of
log messaged in two phases, first cycling through a limited
number of collected packets, and only afterwards freeing
these processed packets.