Skip to content

Commit

Permalink
[dispatcher] fix chaining and freeing of probing packs
Browse files Browse the repository at this point in the history
Some probing packs may be freed before ending circulating the list (if the prob sending fails), so we need to take care of the linking.
  • Loading branch information
bogdan-iancu committed Oct 18, 2022
1 parent 2e7c021 commit c6bcd84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/dispatcher/dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -2762,6 +2762,7 @@ void ds_check_timer(unsigned int ticks, void* param)
pack_last->next = pack;
pack_last = pack;
}
pack->next = NULL;

}
}
Expand All @@ -2770,7 +2771,9 @@ void ds_check_timer(unsigned int ticks, void* param)
lock_stop_read( partition->lock );

/* now send all the probs, outside the lock */
for( pack = pack_head ; pack ; pack=pack->next ) {
for( pack = pack_head ; pack ; pack=pack_last ) {

pack_last = pack->next;

/* Execute the Dialog using the "request"-Method of the
* TM-Module.*/
Expand Down

0 comments on commit c6bcd84

Please sign in to comment.