Skip to content

Commit

Permalink
in_forward: fix checking return value of cmt_decode_msgpack_create(#8000
Browse files Browse the repository at this point in the history
)

Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 committed Oct 7, 2023
1 parent da569ea commit 014e257
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/in_forward/fw_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,8 @@ int fw_prot_process(struct flb_input_instance *ins, struct fw_conn *conn)
}
else if (event_type == FLB_EVENT_TYPE_METRICS) {
ret = cmt_decode_msgpack_create(&cmt, (char *) data, len, &off);
if (ret == -1) {
if (ret != CMT_DECODE_MSGPACK_SUCCESS) {
flb_error("cmt_decode_msgpack_create failed. ret=%d", ret);
msgpack_unpacked_destroy(&result);
msgpack_unpacker_free(unp);
flb_sds_destroy(out_tag);
Expand Down

0 comments on commit 014e257

Please sign in to comment.