From 8426655c7ec1f24edecceda23b8155a4650a2ce4 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Mon, 14 Oct 2024 13:01:18 -0600 Subject: [PATCH] encode: opentelemetry: fix double-free on exceptio (CID 510612) Signed-off-by: Eduardo Silva --- src/ctr_encode_opentelemetry.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ctr_encode_opentelemetry.c b/src/ctr_encode_opentelemetry.c index a9b8b3b..8ec3ad5 100644 --- a/src/ctr_encode_opentelemetry.c +++ b/src/ctr_encode_opentelemetry.c @@ -996,9 +996,7 @@ static Opentelemetry__Proto__Trace__V1__ScopeSpans **set_scope_spans(struct ctra if (scope_span_index > 0) { destroy_scope_spans(scope_spans, scope_span_index - 1); } - - free(scope_spans); - + /* note: scope_spans is freed inside destroy_scope_spans() */ return NULL; }