drive-by: fix valgrind complaint about uninitialized memory

This commit is contained in:
Ken Sedgwick 2024-04-26 14:33:24 -07:00 committed by Rusty Russell
parent e93ad5d124
commit 5b2c237718

View file

@ -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();