diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2015-07-04 22:18:06 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2015-07-13 10:38:52 +0200 |
commit | 49be1bd2f5f5c712e6828f659d4fbb9e27543391 (patch) | |
tree | 39f9b608e247004f89a87356038fdea7ae4d2cf3 | |
parent | bbfc6dadac161c338048eae9766a08fb84350742 (diff) |
flowtop: Fix flows disappearing
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 <vadim4j@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rw-r--r-- | flowtop.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } } } |