浏览代码

[NET_SCHED]: cls_basic: fix memory leak in basic_destroy

tp->root is not freed on destruction.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy 18 年之前
父节点
当前提交
31ba548f96
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      net/sched/cls_basic.c

+ 1 - 0
net/sched/cls_basic.c

@@ -109,6 +109,7 @@ static void basic_destroy(struct tcf_proto *tp)
 		list_del(&f->link);
 		list_del(&f->link);
 		basic_delete_filter(tp, f);
 		basic_delete_filter(tp, f);
 	}
 	}
+	kfree(head);
 }
 }
 
 
 static int basic_delete(struct tcf_proto *tp, unsigned long arg)
 static int basic_delete(struct tcf_proto *tp, unsigned long arg)