Skip to content

Commit

Permalink
tracer: Fix possible crash on NULL context
Browse files Browse the repository at this point in the history
CID #200069

(cherry picked from commit 1b4fcc0)
  • Loading branch information
liviuchircu committed Jul 17, 2020
1 parent 5e92aea commit 9613484
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/tracer/tracer.c
Expand Up @@ -1466,6 +1466,10 @@ static int sip_trace_handle(struct sip_msg *msg, tlist_elem_p el,
if (extra_len) {
instance->trace_attrs = trace_attrs;
}
} else if (!current_processing_ctx) {
LM_BUG("sip_trace() failed due to NULL context");
return -1;

/* for stateful transactions or dialogs
* we need the structure in the shared memory */
} else if(trace_flags == TRACE_DIALOG ||
Expand Down

0 comments on commit 9613484

Please sign in to comment.