Skip to content

Commit

Permalink
tracer: fix trace_stop removal from list
Browse files Browse the repository at this point in the history
Fix the way we detect the previous element when removing from list
Before this change, if there were multiple elements in the list, they
were leaking due to the bad handling of the list removal.

(cherry picked from commit dae9817)
  • Loading branch information
razvancrainea committed Aug 30, 2022
1 parent 6574cb7 commit 86fbeed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/tracer/tracer.c
Expand Up @@ -2837,7 +2837,7 @@ static mi_response_t *sip_trace_mi_stop(const mi_params_t *params,
hash=it->hash;

/* search for the previous element */
for (prev=NULL, it=(*dyn_trace_list); it && it->next; it = it->next) {
for (prev=NULL, it=(*dyn_trace_list); it && it->hash != hash && it->next; it = it->next) {
if (it->next->hash == hash)
break;
else
Expand Down

0 comments on commit 86fbeed

Please sign in to comment.