Skip to content

Commit

Permalink
in_event_type: use flb_ versions for malloc and free
Browse files Browse the repository at this point in the history
Signed-off-by: Aditya Prajapati <[email protected]>
  • Loading branch information
Aditya Prajapati authored and edsiper committed Oct 15, 2022
1 parent fd0a0de commit 6c68a30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/in_event_type/event_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ static struct ctrace_id *create_random_span_id()
ssize_t ret;
struct ctrace_id *cid;

buf = calloc(1, OTEL_SPAN_ID_LEN);
buf = flb_malloc(OTEL_SPAN_ID_LEN);
if (!buf) {
ctr_errno();
return NULL;
}

ret = ctr_random_get(buf, OTEL_SPAN_ID_LEN);
if (ret < 0) {
free(buf);
flb_free(buf);
return NULL;
}

cid = ctr_id_create(buf, OTEL_SPAN_ID_LEN);
free(buf);
flb_free(buf);

return cid;

Expand Down

0 comments on commit 6c68a30

Please sign in to comment.