Skip to content

Commit be40e0b

Browse files
Aditya Prajapatimgeriesa
authored andcommitted
in_event_type: use flb_ versions for malloc and free
Signed-off-by: Aditya Prajapati <[email protected]> Signed-off-by: Manal Geries <[email protected]>
1 parent ebd7e5a commit be40e0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/in_event_type/event_type.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,20 @@ static struct ctrace_id *create_random_span_id()
4545
ssize_t ret;
4646
struct ctrace_id *cid;
4747

48-
buf = calloc(1, OTEL_SPAN_ID_LEN);
48+
buf = flb_malloc(OTEL_SPAN_ID_LEN);
4949
if (!buf) {
5050
ctr_errno();
5151
return NULL;
5252
}
5353

5454
ret = ctr_random_get(buf, OTEL_SPAN_ID_LEN);
5555
if (ret < 0) {
56-
free(buf);
56+
flb_free(buf);
5757
return NULL;
5858
}
5959

6060
cid = ctr_id_create(buf, OTEL_SPAN_ID_LEN);
61-
free(buf);
61+
flb_free(buf);
6262

6363
return cid;
6464

0 commit comments

Comments
 (0)