Skip to content

Commit f2517a1

Browse files
committed
ml: rule: Propagate errors
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent 4788161 commit f2517a1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/multiline/flb_ml_rule.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ int flb_ml_rule_process(struct flb_ml_parser *ml_parser,
381381
}
382382
else {
383383
ret = flb_ml_group_cat(group, buf_data, buf_size);
384+
if (ret < 0) {
385+
return ret;
386+
}
384387
if (ret == FLB_MULTILINE_TRUNCATED) {
385388
/* Buffer is full. Flush immediately to send the truncated record. */
386389
flb_ml_flush_stream_group(ml_parser, mst, group, FLB_FALSE);
@@ -411,6 +414,9 @@ int flb_ml_rule_process(struct flb_ml_parser *ml_parser,
411414

412415
/* concatenate the data */
413416
ret = flb_ml_group_cat(group, buf_data, buf_size);
417+
if (ret < 0) {
418+
return ret;
419+
}
414420
if (ret == FLB_MULTILINE_TRUNCATED) {
415421
return ret;
416422
}

0 commit comments

Comments
 (0)