vlib_buffer_free_inline actually checks (b->flags & VLIB_BUFFER_RECYCLE)
in order to decide whether to free the packet or not.
Although the flag was correctly set in replication_prep, it is not removed
by replication_recycle during last iteration.
This patch just removes VLIB_BUFFER_RECYCLE when is_last is set.
Change-Id: I2445ebce908d94d95535e706b40407b4f15906e4
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
// This is the last replication in the list.
// Restore original buffer free functionality.
b0->free_list_index = ctx->saved_free_list_index;
+ b0->flags &= ~VLIB_BUFFER_RECYCLE;
// Free context back to its pool
pool_put (rm->contexts[cpu_number], ctx);