Skip to content

Commit

Permalink
drive-by: fix valgrind complaint about uninitialized memory
Browse files Browse the repository at this point in the history
  • Loading branch information
ksedgwic authored and rustyrussell committed May 9, 2024
1 parent e93ad5d commit 5b2c237
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static void trace_inject_traceparent(void)
static void trace_init(void) {
if (active_spans)
return;
active_spans = malloc(sizeof(struct span) * MAX_ACTIVE_SPANS);
active_spans = calloc(MAX_ACTIVE_SPANS, sizeof(struct span));

current = NULL;
trace_inject_traceparent();
Expand Down

0 comments on commit 5b2c237

Please sign in to comment.