net-sched: change tcf_destroy_chain() to clear start of filter list
Pass double tcf_proto pointers to tcf_destroy_chain() to make it clear the start of the filter list for more consistency. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
77a538d5aa
commit
ff31ab56c0
@@ -1252,12 +1252,12 @@ void tcf_destroy(struct tcf_proto *tp)
|
||||
kfree(tp);
|
||||
}
|
||||
|
||||
void tcf_destroy_chain(struct tcf_proto *fl)
|
||||
void tcf_destroy_chain(struct tcf_proto **fl)
|
||||
{
|
||||
struct tcf_proto *tp;
|
||||
|
||||
while ((tp = fl) != NULL) {
|
||||
fl = tp->next;
|
||||
while ((tp = *fl) != NULL) {
|
||||
*fl = tp->next;
|
||||
tcf_destroy(tp);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user