In netflow-export.c, function process_hashtable(), the linked list algorithm has a bug: when a flow has expired and is moved from bkt to export_list, the "hole" in bkt is not patched. This results in each bucket having an item that points to an item inside of export_list. The "previous" item in the Bucket needs to be assigned to bkt->next. Unfortunately, there is not a 1-line fix to this problem. Please see the below example of how to iterate over a linked list and remove multiple items from it in one pass. It requires 1 while loop to remove head(s), then another while loop for the rest of the list, and inside of that loop is another loop for skipping items that should not be removed.
In netflow-export.c, function process_hashtable(), the linked list algorithm has a bug: when a flow has expired and is moved from bkt to export_list, the "hole" in bkt is not patched. This results in each bucket having an item that points to an item inside of export_list. The "previous" item in the Bucket needs to be assigned to bkt->next. Unfortunately, there is not a 1-line fix to this problem. Please see the below example of how to iterate over a linked list and remove multiple items from it in one pass. It requires 1 while loop to remove head(s), then another while loop for the rest of the list, and inside of that loop is another loop for skipping items that should not be removed.
Delete all occurrences of a given key in a linked list, by Saransh http://quiz.geeksforgeeks.org/delete-occurrences-given-key-linked-list/