Skip to content

Commit

Permalink
encode: opentelemetry: fix double-free on exceptio (CID 510612)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Oct 14, 2024
1 parent 44c4279 commit c2cd444
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ctr_encode_opentelemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c2cd444

Please sign in to comment.