input: fix leak when buffer size from filtered data is zero (#796, #693)
input: fix leak when buffer size from filtered data is zero (#796, #693)

When a Filter removes 'all' the records from the incoming buffer (dyntag), the
buffer get's in a zombie state where is never processed since it's size is zero,
leading to a memory leak: the dyntag context is never released. The scenarios
where the memory leak is visible on setups using any kind of filter.

This patch fix the problem, so when the input interface calls the filtering
process, it validate the returned data size, if the size is zero it just drop
the dyntag context.

note: the root cause of the problem could be associated to #743, we need
      to confirm.

Signed-off-by: Eduardo Silva <81f705dc2ce1a61a2621e0e4b442a9474e1d0c70@treasure-data.com>

fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit,nokute78/fluent-bit,fluent/fluent-bit