Skip to content

Commit 7eb03a3

Browse files
Leonardo Alminanaedsiper
authored andcommitted
out_splunk: release flb_ra_translate result buffer on failure
Signed-off-by: Leonardo Alminana <[email protected]>
1 parent 7ab07aa commit 7eb03a3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/out_splunk/splunk.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ static inline int pack_event_key(struct flb_splunk *ctx, msgpack_packer *mp_pck,
268268
t = flb_time_to_double(tm);
269269
val = flb_ra_translate(ctx->ra_event_key, tag, tag_len, map, NULL);
270270
if (!val || flb_sds_len(val) == 0) {
271+
if (val != NULL) {
272+
flb_sds_destroy(val);
273+
}
274+
271275
return -1;
272276
}
273277

0 commit comments

Comments
 (0)