Skip to content

Commit

Permalink
Fix invalid allocation of null span context
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Hier committed Mar 6, 2018
1 parent cb8cf05 commit e333c13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/opentracing-c/tracer.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ static int null_tracer_extract(opentracing_tracer* tracer,
(void) format;
(void) carrier;
assert(span_context != NULL);
*span_context = malloc(sizeof(span_context));
*span_context =
(opentracing_span_context*) malloc(sizeof(opentracing_span_context));
if (*span_context == NULL) {
return 0;
}
Expand Down

0 comments on commit e333c13

Please sign in to comment.