filter: do not attemp to filter an empty buffer
@@ -93,10 +93,10 @@ void flb_filter_do(msgpack_sbuffer *mp_sbuf, msgpack_packer *mp_pck,
/* Override buffer just if it was modified */
if (ret == FLB_FILTER_MODIFIED) {
- /* all records removed */
+ /* all records removed, no data to continue processing */
if (out_size == 0) {
mp_sbuf->size = 0;
- continue;
+ break;
}
flb_filter_replace(mp_sbuf, mp_pck, /* msgpack */
