Skip to content

Commit

Permalink
out_syslog: check error after flb_log_event_decoder_next (#7639)
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 authored and leonardo-albertovich committed Jul 17, 2023
1 parent ec565bb commit f0e2fa4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/out_syslog/syslog.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,9 +991,9 @@ static int cb_syslog_format_test(struct flb_config *config,
return -1;
}

if ((ret = flb_log_event_decoder_next(
&log_decoder,
&log_event)) != FLB_EVENT_DECODER_SUCCESS) {
flb_log_event_decoder_next(&log_decoder, &log_event);
ret = flb_log_event_decoder_get_last_result(&log_decoder);
if (ret != FLB_EVENT_DECODER_SUCCESS) {
flb_error("msgpack_unpack_next failed");

flb_log_event_decoder_destroy(&log_decoder);
Expand Down

0 comments on commit f0e2fa4

Please sign in to comment.