From: Vadim Kochan <vadi...@gmail.com>

While removing flow which is pointed by 'head' then
head is set to NULL and all the list disappears, so fixed
by set removing flow next entry to list 'head'.

Signed-off-by: Vadim Kochan <vadi...@gmail.com>
---
 flowtop.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/flowtop.c b/flowtop.c
index e7a1bfa..9d1991a 100644
--- a/flowtop.c
+++ b/flowtop.c
@@ -368,8 +368,10 @@ static void flow_list_destroy_entry(struct flow_list *fl,
 
                        flow_entry_xfree(n1);
                } else {
+                       struct flow_entry *next = fl->head->next;
+
                        flow_entry_xfree(fl->head);
-                       fl->head = NULL;
+                       fl->head = next;
                }
        }
 }
-- 
2.4.2

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to